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


C# MODE类代码示例

本文整理汇总了C#中MODE的典型用法代码示例。如果您正苦于以下问题:C# MODE类的具体用法?C# MODE怎么用?C# MODE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MODE类属于命名空间,在下文中一共展示了MODE类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	private float _displayScale;		// 1ポイントあたりのピクセル数。Retina なら 2.0 になる

	// Use this for initialization
	void Start ()
	{
		#if (UNITY_IOS || UNITY_IPHONE) && !UNITY_5_AND_LATER
		AudioSettings.outputSampleRate = 44100;
		#endif	

		_currentMode = MODE.MAIN;
		_displayScale = Math.Min (Screen.width, Screen.height) / 320.0f;
		_isCapturing = false;

		// テスト用ボタンを表示するかの設定値を取得
		LobiSettings settings = (LobiSettings)Resources.Load (SETTING_FILE);
		_isTestButtonsEnable = settings.IsValid == true && settings.IsEnabled == true && settings.testButtonsEnabled;
		if (_isTestButtonsEnable == false) {
			Debug.Log ("Invalid or missing game credentials, Lobi disabled");
			Debug.Log (settings.IsValid + ", " + settings.IsEnabled);
			return;
		}

		// 各SDKのクラスを取得する。Unityプロジェクトにインポートされていないクラスはnullが返る
		_recType = Type.GetType (LOBI_REC_BRIDGE);
		_rankingType = Type.GetType (LOBI_RANKING_BRIDGE);

		// テストボタンのスタイルを設定する
		s_buttonStyle = new GUIStyle();
		s_buttonStyle.wordWrap = true;
		s_buttonStyle.fontSize = (int)(BUTTON_HEIGHT * 0.5);
		s_buttonStyle.alignment = TextAnchor.MiddleCenter;
		s_buttonStyle.normal.textColor = new Color (0.1f, 0.1f, 0.1f);
		Texture2D texture = new Texture2D( 1, 1, TextureFormat.ARGB32, false );
		texture.SetPixel(0,0, new Color(1.0f, 1.0f, 1.0f, 0.8f) );
		texture.Apply();
		s_buttonStyle.normal.background = texture;
	}
开发者ID:3nan,项目名称:unity_practice,代码行数:37,代码来源:LobiTest.cs

示例2: MainWindow

		public MainWindow()
        {
            InitializeComponent();

			setWindow();

			mMode = MODE.ORDER;

			setTitle();
			setMode();
			//Discount d = new Discount();
			//d.ShowDialog();

			Item item01 = new Item(0, 01, "수상스키", "", 25000, false, false, false, false);

			//DBManager dbm = DBManager.getInstance();
			//dbm.addItem(item01);
			/*
			DateTime dt = DateTime.Now;
			long ab = dt.Ticks;
			string a = string.Format("{0:yyyy/MM/dd-HH:mm:ss}", dt);
			Debug.Print(a);
			*/

			mMenuCanvas = new MenuCanvas(0, 50, 300, 1024 - 50);
			canvas.Children.Add(mMenuCanvas);
			mMenuCanvas.Visibility = Visibility.Hidden;
		}
开发者ID:jelee9,项目名称:wsr_pos_vs,代码行数:28,代码来源:MainWindow.xaml.cs

示例3: StopwatchCS

 public StopwatchCS()
 {
     timer = new Stopwatch();
     timer.Reset();
     displayFrozen = false;
     currentMode = MODE.DateTime;
 }
开发者ID:adwylie,项目名称:stopwatchMbt,代码行数:7,代码来源:Main.cs

示例4: ScanForm

        public ScanForm(MainForm parent, MODE mode)
        {
            this.mode = mode;

            InitializeComponent();
            this.ParentForm = parent;

            setModeDependentLayout();

            // Initialize the ScanSampleAPI reference.
            this.myScanSampleAPI = new API();

            this.isReaderInitiated = this.myScanSampleAPI.InitReader();

            if (!(this.isReaderInitiated))// If the reader has not been initialized
            {
                // Display a message & exit the application.
                MessageBox.Show("Reader could not be initialized");
                Application.Exit();
            }
            else // If the reader has been initialized
            {

                // Attach a status natification handler.
                this.myStatusNotifyHandler = new EventHandler(myReader_StatusNotify);
                myScanSampleAPI.AttachStatusNotify(myStatusNotifyHandler);
            }

            //Enable reading
            // Start a read operation & attach a handler.
            myScanSampleAPI.StartRead(false);
            this.myReadNotifyHandler = new EventHandler(myReader_ReadNotify);
            myScanSampleAPI.AttachReadNotify(myReadNotifyHandler);
        }
开发者ID:nickmeuws,项目名称:TechnicalStockScan,代码行数:34,代码来源:ScanForm.cs

示例5: SupportNoteDialog

 public SupportNoteDialog(SupportStatWindow stat_windows, bool is_break)
     : this()
 {
     this.mode = MODE.ADD;
     this.stat_windows = stat_windows;
     this.IS_BREAK = (is_break ? "Y" : "N");
 }
开发者ID:wee2tee,项目名称:SN_Net,代码行数:7,代码来源:SupportNoteDialog.cs

示例6: Update

    /// <summary>
    /// Uses a switch statement to go between the panel and the map
    /// The ZONES state uses raycasting to select a map zone square,
    /// and switches to the PANEL state, which opens the level selection panel
    /// </summary>
    void Update()
    {
        switch (mode)
        {
            case MODE.ZONES:
                if (Input.GetMouseButtonDown(0))
                {
                    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

                    RaycastHit hit;
                    if (Physics.Raycast(ray.origin, ray.direction, out hit))
                    {
                        Collider coll = hit.collider;
                        string name = coll.gameObject.name;
                        panel = GameObject.Find(name + "Panel");
                        panel.GetComponent<LevelPanelScale>().scaleUp();
                        mode = MODE.PANEL;
                    }
                }
                break;
            case MODE.PANEL:
                if (Input.GetKey(KeyCode.Escape))
                {
                    panel.GetComponent<LevelPanelScale>().close();
                    mode = MODE.ZONES;
                    panel = null;
                }
                break;
        }
    }
开发者ID:TheMergeConflicts,项目名称:StemGame,代码行数:35,代码来源:LevelMapManager.cs

示例7: Start

    // Use this for initialization
    void Start()
    {
        m_strong		= StrongDefault;
        m_mode			= MODE.MODE_WALK;

        m_waitChangeMode	= WAIT_CHANGE_MODE;
        m_waitDestroy		= WAIT_DESTROY;
    }
开发者ID:hagura,项目名称:unity_chiruno03,代码行数:9,代码来源:behaviourEnemyBase.cs

示例8: Motor

 public Motor(int xDim, int yDim)
 {
     mode = MODE.OFF;
     m = xDim;
     n = yDim;
     total = m * n;
     A = new int[m, n];
     
 }
开发者ID:SBreso,项目名称:CuatroEnRaya,代码行数:9,代码来源:Motor.cs

示例9: AndonManager

        public AndonManager(Queue<int> stationList, Queue<int> departmentList , MODE mode)
        {
            try
            {
                responseTimeout = int.Parse(ConfigurationSettings.AppSettings["ResponseTimeout"]);
                this.mode = mode;

                transactionTimer = new System.Timers.Timer(responseTimeout);
                transactionTimer.Elapsed += new ElapsedEventHandler(transactionTimer_Elapsed);
                transactionTimer.AutoReset = false;

                simulation = ConfigurationSettings.AppSettings["SIMULATION"];

                if (simulation != "Yes")
                {
                    spDriver = new SerialPortDriver(57600,8,StopBits.One,Parity.None,Handshake.None);

                    communicationPort = ConfigurationSettings.AppSettings["PORT"];
            
                    
	                rs485Driver = new RS485Driver();
                    xbeeDriver = new XbeeDriver(XbeeDriver.COMMUNICATION_MODE.API_ESC);
                    xbeeIdentifier = ConfigurationSettings.AppSettings["XBeeIdentifier"];


                    //communicationPort = findXbeePort(xbeeIdentifier);   //find the port of xbee

                    //if (communicationPort == String.Empty)
                    //{
                    //    throw new AndonManagerException(" Error : Xbee Device Not Found ");
                    //}



	
	                stations = stationList;
	                departments = departmentList;
	
	                transactionQ = new Queue<TransactionInfo>();
                    
                    
                }
                else{
                	
                	simulationTimer = new System.Timers.Timer(2 * 1000);
                	simulationTimer.Elapsed += new ElapsedEventHandler(simulationTimer_Elapsed);
                    simulationTimer.AutoReset = false;
                	
                }

                whID = Convert.ToInt32(ConfigurationSettings.AppSettings["WH_ID"]);
            }
            catch (Exception e)
            {
                throw new AndonManagerException("Andon Manager Initialization Error:"+e.Message);
            }
        }
开发者ID:jjyothilinga,项目名称:AndonTerminal,代码行数:57,代码来源:AndonManager.cs

示例10: SoundManager

 internal SoundManager(FMOD.System system, bool hardware = true)
 {
     _log = Logging.LogManager.GetLogger(this);
     _log.Info("Initializing SoundManager...");
     _system = system;
     _sounds = new List<Sound>();
     _soundMode = hardware ? MODE.HARDWARE : MODE.SOFTWARE;
     _log.DebugFormat("Sound Mode == {0}", _soundMode);
     _log.Debug("SoundManager initialized!");
 }
开发者ID:Sharparam,项目名称:DiseasedToast,代码行数:10,代码来源:SoundManager.cs

示例11: Read

 public void Read(MODE mode,string prefix, string nsUrl)
 {
     xmlDoc = new XmlDocument();
     if (mode == MODE.FILE)
     {
         xmlDoc.Load(path);
         nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
         nsmgr.AddNamespace(prefix,nsUrl);
     }
 }
开发者ID:MarineGIS,项目名称:Encs_Importer,代码行数:10,代码来源:Reader.cs

示例12: Game1

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 800;

            gameMode = MODE.paused;
            bricksWide = 1280 / 47;

            backgroundColor = Color.CornflowerBlue;
            screenRectangle = new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
        }
开发者ID:rene-ye,项目名称:A4Breakout,代码行数:14,代码来源:Game1.cs

示例13: QRCodeGenerator

        const int QrCodeVersionStep = 1;/*if version == 0, we calculate the best version using the step*/

     
        public QRCodeGenerator()
        {
            qrcodeErrorCorrect = ERRORCORRECTION.M;
            qrcodeEncodeMode = MODE.BYTE;
            qrcodeVersion = 0;

            qrcodeStructureappendN = 0;
            qrcodeStructureappendM = 0;
            qrcodeStructureappendParity = 0;

            QRCodeScale = 4;
            QRCodeBackgroundColor = Colors.White;
            QRCodeForegroundColor = Colors.Black;
        }
开发者ID:rcrozon,项目名称:PartyProject,代码行数:17,代码来源:QRCodeEncoder.cs

示例14: Propagation

 public static void Propagation(WaveField1D _wf1, ref WaveField1D _wf2, MODE _MODE = MODE.CPU, DIRECTION _DIRECTION = DIRECTION.FORWARD)
 {
     switch(_MODE)
     {
         case MODE.CPU:
             ClsNac.WaveOpticsCLR.Prop1D(
                 _wf1.lambda, (int)_DIRECTION,
                 _wf1.x, _wf1.y, _wf1.u,
                 _wf2.x, _wf2.y, _wf2.u);
             break;
         case MODE.CUDA:
             PropFw1dCuda(_wf1, ref _wf2);
             break;
     }
 }
开发者ID:hirokinnp,项目名称:Simulation,代码行数:15,代码来源:ClsNac.WaveOptics.cs

示例15: OnCollisionEnter

 void OnCollisionEnter(Collision _col)
 {
     if (_col.gameObject.tag == "bulletSelf") {
         m_strong--;
         if (m_strong <= 0) {
             m_mode			= MODE.MODE_DESTROY;
             m_waitDestroy	= WAIT_DESTROY;
         }
     }
     else if (_col.gameObject.tag == "bulletOther") {
         m_strong--;
         if (m_strong <= 0) {
             m_mode			= MODE.MODE_DESTROY;
             m_waitDestroy	= WAIT_DESTROY;
         }
     }
 }
开发者ID:hagura,项目名称:unity_chiruno03,代码行数:17,代码来源:behaviourEnemyBase.cs


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