public static void setVar(string var_name, object var_value) { SBGlobals.init(); if (SBGlobals.globals.ContainsKey(var_name)) { SBGlobals.globals[var_name] = var_value; return; } SBGlobals.globals.Add(var_name, var_value); }
protected void OnDaySelectedDoubleClicked(object sender, EventArgs args) { DateTime date = this._calendar.GetDate(); this.entryDate.Text = date.ToString(this.DateFormat); this._calendar.Hide(); this._calendar.Destroy(); this._calendar = null; (SBGlobals.getVar("app") as SBApplication).logString("day double clicked"); }
/// <summary> /// Set a global var /// /// </summary> /// <returns>The variable.</returns> /// <param name="var_name">Variable name.</param> public static object getVar(string var_name) { SBGlobals.init(); if (!SBGlobals.globals.ContainsKey(var_name)) { return(null); } return(SBGlobals.globals[var_name]); }