当前位置: 首页>>代码示例>>C#>>正文


C# Global类代码示例

本文整理汇总了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;
            }
        }
开发者ID:tatar1nro,项目名称:KKM_Inventory_WinCE,代码行数:29,代码来源:MedView.cs

示例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;
        }
开发者ID:tatar1nro,项目名称:KKM_Trash,代码行数:33,代码来源:regCount.cs

示例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");
        }
开发者ID:tatar1nro,项目名称:KKM_PFR_ScanTerminal,代码行数:35,代码来源:Step2.cs

示例4: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            Global global = new Global();
            Window startupWindow = global.StartupWindow;

            startupWindow.Show();
        }
开发者ID:SneakyMax,项目名称:Rosette,代码行数:7,代码来源:App.xaml.cs

示例5: Server

 protected Server()
     : base(0)
 {
     this.global = Global.getInstance();
     this.type = NodeType.SERVER;
     this.objectLocations = new Dictionary<int, ObjectLocation>();
 }
开发者ID:marvelliu,项目名称:IOTResearch,代码行数:7,代码来源:Server.cs

示例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;
        }
开发者ID:tatar1nro,项目名称:KKM_Inventory_WinCE,代码行数:25,代码来源:Conf.cs

示例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
开发者ID:Ar2rZ,项目名称:tetbeams,代码行数:34,代码来源:SetupManager.cs

示例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));
 }
开发者ID:marvelliu,项目名称:IOTResearch,代码行数:7,代码来源:LogicalPathReader.cs

示例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);
                }
            }
        }
开发者ID:tatar1nro,项目名称:KKM_Trash,代码行数:30,代码来源:miniRouteList.cs

示例10: Application_Start

 protected void Application_Start(object sender, EventArgs e)
 {
     GlobalConfiguration.Configure(WebApiConfig.Register);
     Instance = this;
     Tracer.Create("EVServices");
     Tracer.Debug("Application_Start.");
 }
开发者ID:Rajeshbharathi,项目名称:CGN.Paralegal,代码行数:7,代码来源:Global.asax.cs

示例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;
		}
开发者ID:netordead,项目名称:SqlInserter,代码行数:7,代码来源:OptionForm.cs

示例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);
        }
开发者ID:dzamkov,项目名称:Hailstone,代码行数:32,代码来源:TypeInterface.cs

示例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;
        }
开发者ID:TvSourcerer,项目名称:TvSourcerer,代码行数:38,代码来源:ShowRss.cs

示例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");
        }
开发者ID:tatar1nro,项目名称:KKM_Trash,代码行数:32,代码来源:Step3.cs

示例15: Start

 // Use this for initialization
 void Start()
 {
     GameObject g = GameObject.Find ("GlobalObject");
     globalObj = g.GetComponent< Global >();
     //lastScore = 0;
     scoreText = gameObject.GetComponent<GUIText>();
 }
开发者ID:kshen0,项目名称:roids,代码行数:8,代码来源:ScoreUI.cs


注:本文中的Global类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。