本文整理汇总了C#中Global类的典型用法代码示例。如果您正苦于以下问题:C# Global类的具体用法?C# Global怎么用?C# Global使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Global类属于命名空间,在下文中一共展示了Global类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MedView
public MedView(Global g, string uin)
{
this.uin = uin;
this.g = g;
InitializeComponent();
SetDoubleBuffered(this.dataGrid1, true);
if (g.conf7 == "1")
{
SetupTableStylesFull();
}
else
{
SetupTableStyles();
}
SetupDataTable("");
Clipboard.SetDataObject(" ");
if (g.conf10 == "1")
{
this.dataGrid1.Visible = false;
this.textBox1.Visible = false;
this.label1.Visible = true;
this.label2.Visible = true;
}
}
示例2: regCount
public regCount(Global g,itemBook it)
{
this.g = g;
this.it = it;
InitializeComponent();
it.Compare();
string[] buffCount = it.count.Split('.');
try
{
this.textBox1.Text = buffCount[0];
}
catch (Exception) { }
if (it.mes == "1")
{
label5.Text = "(Весовой)";
textBox2.Enabled = true;
try
{
this.textBox2.Text = buffCount[1];
}
catch (Exception) { }
}
else
{
label5.Text = "(Штучный)";
textBox2.Enabled = false;
}
label4.Text = it.title;
}
示例3: Step2
public Step2(Global g)
{
this.Opacity = 0.0f;
this.g = g;
// this.BackgroundImage = g.getTheme("bg");
InitializeComponent();
initTheme();
noFocus.Select();
System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
aTimer.Interval = 500;
aTimer.Enabled = true;
DateTime t1 = DateTime.Now;
string H = t1.Hour.ToString();
if (H.Length == 1) H = "0" + H;
string M = t1.Minute.ToString();
if (M.Length == 1) M = "0" + M;
if (t1.Second % 2 == 0)
SetTime(H + ":" + M);
else
SetTime(H + " " + M);
//pbs.Add("1", pictureBox1);
// pbs.Add("2", pictureBox2);
// pbs.Add("3", pictureBox3);
// pbs.Add("4", pictureBox4);
loadMENU0();
g.playVoice("5");
}
示例4: OnStartup
protected override void OnStartup(StartupEventArgs e)
{
Global global = new Global();
Window startupWindow = global.StartupWindow;
startupWindow.Show();
}
示例5: Server
protected Server()
: base(0)
{
this.global = Global.getInstance();
this.type = NodeType.SERVER;
this.objectLocations = new Dictionary<int, ObjectLocation>();
}
示例6: Conf
public Conf(Global g)
{
this.g = g;
InitializeComponent();
comboBox1.SelectedIndex = 0;
textBox1.Text = g.conf1;
comboBox1.SelectedIndex = Convert.ToInt32(g.conf2);
textBox2.Text = g.conf3;
textBox3.Text = g.conf4;
if (g.conf5 == "1") checkBox1.Checked = true;
if (g.conf10 == "1") checkBox3.Checked = true;
textBox4.Text = g.conf6;
if (g.conf7 == "1") checkBox2.Checked = true;
textBox5.Text = g.conf8;
textBox6.Text = g.conf9;
}
示例7: Start
//init
void Start() {
//get game objects from scene
globalObj = GameObject.FindWithTag(TAG_GLOBAL); //global game object
globalScript = globalObj.GetComponent<Global>(); //global script
setupObj = GameObject.FindWithTag(TAG_SETUP); //setup game object
connectScript = setupObj.GetComponent<Connect>(); //connect script
activateScript = setupObj.GetComponent<Activate>(); //activate script
//disable scripts to start
//note: disable/uncheck scripts in the Unity interface
connectScript.enabled = false;
activateScript.enabled = false;
//state manager
//transition into scene
//initialize since this is the first scene
if (StateManager.Instance != null) {
//set the transition effects for the state manager
StateManager.Instance.gameObject.GetComponent<TransitionFade>().isFadingIn = true;
StateManager.Instance.gameObject.GetComponent<TransitionFade>().isHoldFade = false;
}
//audio manager
//initialize since this is the first scene
if (AudioManager.Instance != null) {
//set the transition effects for the audio manager
//bgm
AudioManager.Instance.switchBgmAfterDelay(AudioManager.Instance.bgmMenu, 0.0f);
AudioManager.Instance.bgmIsFadingIn = true;
AudioManager.Instance.bgmIsHoldFade = false;
}
} //end function
示例8: LogicalPathReader
public LogicalPathReader(int id, int org)
: base(id, org)
{
this.global = Global.getInstance();
this.reversePathCache = new Dictionary<string, ReversePath>();
Event.AddEvent(new Event(scheduler.currentTime, EventType.CHK_REV_PATH_CACHE, this, null));
}
示例9: findWays
public void findWays(List<miniWayList> mwl,Global g)
{
fintRoutes.Clear();
citys.Clear();
foreach (miniWayList ww in mwl)
{
if (barcodes.Contains(ww.barcode))
{
foreach (string str in ww.citys)
citys.Add(str);
}
}
foreach (Route rr in g.dataRoutes)
{
bool trigger = true;
foreach (string str in citys)
{
if (!rr.dataAllCitys.Contains(str))
{
trigger = false;
}
}
if (trigger)
{
this.fintRoutes.Add(rr);
}
}
}
示例10: Application_Start
protected void Application_Start(object sender, EventArgs e)
{
GlobalConfiguration.Configure(WebApiConfig.Register);
Instance = this;
Tracer.Create("EVServices");
Tracer.Debug("Application_Start.");
}
示例11: SetUIFromSettings
public void SetUIFromSettings(Global.RefreshMode mode)
{
chkIdentity.Checked = Global.DBSetting.IdentityInsert;
chkDelete.Checked = Global.DBSetting.DeleteBeforeInsert;
this.chkScriptToFile.Checked = Global.DBSetting.ScriptToFile;
this.txtFile.Text = Global.DBSetting.FileNameResult;
}
示例12: Load
/// <summary>
/// Loads the changes from the given stream and applies them to the given object.
/// </summary>
public void Load(Global Global, ref object Object, Stream Stream)
{
Lua.lua_State state = Global.Default.Instantiate();
this.Push(state, Object);
Lua.lua_setglobal(state, this.Name);
string code;
using (TextReader txt = new StreamReader(Stream))
{
code = txt.ReadToEnd();
}
int compileerr = Lua.luaL_loadstring(state, code);
if (compileerr != 0)
{
string error = Lua.lua_tostring(state, -1).ToString();
throw new Exception(error);
}
int runerr = Lua.lua_pcall(state, 0, 0, 0);
if (runerr != 0)
{
string error = Lua.lua_tostring(state, -1).ToString();
throw new Exception(error);
}
Lua.lua_getglobal(state, this.Name);
Object = this.To(state, -1);
}
示例13: FindTorrent
/// <summary>
///
/// </summary>
/// <param name="series"></param>
/// <param name="episode"></param>
/// <param name="quality"></param>
/// <returns></returns>
public override SearchResult FindTorrent(Series series,
Episode episode,
Global.EpisodeQuality quality)
{
var rssFeed = from r in _rssShows where r.Item2.ToLower() == series.Name.ToLower() select r;
if (rssFeed.Any() == false)
{
// Log
return null;
}
List<RssResult> rssResults = GetShowRssResults(rssFeed.First().Item1, series.Id);
var result = from r in rssResults
where
r.SeasonNumber == episode.SeasonNumber & r.EpisodeNumber == episode.EpisodeNumber &
r.Quality == quality
select r;
// Need a fall back option on the quality
if (result.Any() == false)
{
return null;
}
SearchResult searchResult = new SearchResult();
searchResult.Url = result.First().Url;
searchResult.Quality = result.First().Quality;
return searchResult;
}
示例14: Step3
public Step3(Global g,string t )
{
this.Opacity = 0.0f;
this.g = g;
this.SelectedInput = t;
// this.BackgroundImage = g.getTheme("bg");
InitializeComponent();
initTheme();
System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
aTimer.Interval = 500;
aTimer.Enabled = true;
DateTime t1 = DateTime.Now;
string H = t1.Hour.ToString();
if (H.Length == 1) H = "0" + H;
string M = t1.Minute.ToString();
if (M.Length == 1) M = "0" + M;
if (t1.Second % 2 == 0)
SetTime(H + ":" + M);
else
SetTime(H + " " + M);
bmp = new Bitmap(Path.Combine(Application.StartupPath + @"\img", "a.gif"));
ImageAnimator.Animate(bmp, new EventHandler(this.OnFrameChanged));
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Step3_Paint);
g.playVoice("10");
}
示例15: Start
// Use this for initialization
void Start()
{
GameObject g = GameObject.Find ("GlobalObject");
globalObj = g.GetComponent< Global >();
//lastScore = 0;
scoreText = gameObject.GetComponent<GUIText>();
}