1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
/*
* ProgressBarWithLabel.cs
* Copyright © 2011 kbinani
*
* This file is part of org.kbinani.cadencii.
*
* org.kbinani.cadencii is free software; you can redistribute it and/or
* modify it under the terms of the GPLv3 License.
*
* org.kbinani.cadencii is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#if JAVA
package org.kbinani.cadencii;
import org.kbinani.*;
#else
using System;
namespace org.kbinani.cadencii
{
#endif
/// <summary>
/// 実行内容を表示するためのラベル付きのプログレスバー
/// </summary>
public class ProgressBarWithLabel
{
private ProgressBarWithLabelUi ptrUi = null;
private Object ptrArgument = null;
#if !JAVA
~ProgressBarWithLabel()
{
#if __cplusplus
mman.del( ptrUi );
#endif
}
#endif
public void setWidth( int value )
{
if ( ptrUi == null ) return;
ptrUi.setWidth( value );
}
/// <summary>
/// UIのセットアップを行います
/// </summary>
/// <param name="ui"></param>
public void setupUi( ProgressBarWithLabelUi ui )
{
if ( ptrUi == null ) {
ptrUi = ui;
}
}
/// <summary>
/// セットアップされているUIを取得します
/// </summary>
/// <returns></returns>
public ProgressBarWithLabelUi getUi()
{
return ptrUi;
}
/// <summary>
/// ラベルのテキストを設定します
/// </summary>
/// <param name="value">設定するテキスト</param>
public void setText( String value )
{
if ( ptrUi == null ) {
return;
}
ptrUi.setText( value );
}
/// <summary>
/// ラベルのテキストを取得します
/// </summary>
/// <returns>ラベルのテキスト</returns>
public String getText()
{
if ( ptrUi == null ) {
return "";
}
return ptrUi.getText();
}
/// <summary>
/// 進捗状況をパーセントで設定します
/// </summary>
/// <param name="value">設定する値</param>
public void setProgress( int value )
{
if ( ptrUi == null ) return;
ptrUi.setProgress( value );
}
/// <summary>
/// 進捗状況を表すパーセンテージを取得します
/// </summary>
/// <returns>進捗状況を表すパーセント値</returns>
public int getProgress()
{
if ( ptrUi == null ) {
return 0;
}
return ptrUi.getProgress();
}
};
#if !JAVA
}
#endif
|