• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MODE类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: SetInstance

        public void SetInstance(int id, MODE mode) {
            if(id == -1) {
                for(int i = 0; i < deviceCount; i += 1) {
                    SetInstance(i, mode);
                }
                return;
            }

            try {
                Instances[id].Stop();
                Instances[id].Dispose();
            } catch(KeyNotFoundException) {
                Log("Key " + id + " not found...Creating Instance...");
            } finally {
                Instances[id] = CreateInstance(id, mode);
            }
        }
开发者ID:abigail3306,项目名称:wintumbra,代码行数:17,代码来源:ExtensionManager.cs


示例17: SongManager

        internal SongManager(FMOD.System system, bool hardware = true)
        {
            _log = Logging.LogManager.GetLogger(this);
            _log.Info("Initializing SongManager...");
            _system = system;
            _songs = new List<Song>();

            // ReSharper disable BitwiseOperatorOnEnumWihtoutFlags
            if (hardware)
                _soundMode = MODE._2D | MODE.HARDWARE | MODE.CREATESTREAM;
            else
                _soundMode = MODE._2D | MODE.SOFTWARE | MODE.CREATESTREAM;
            // ReSharper restore BitwiseOperatorOnEnumWihtoutFlags

            _log.DebugFormat("Sound Mode == {0}", _soundMode);
            _log.Debug("SongManager initialized!");
        }
开发者ID:Sharparam,项目名称:DiseasedToast,代码行数:17,代码来源:SongManager.cs


示例18: SetMode

 private void SetMode(MODE mode)
 {
     dataSource.IsFillColorSelected = false;
     dataSource.IsFontColorSelected = false;
     dataSource.IsLineColorSelected = false;
     
     switch (mode)
     {
         case MODE.LINE:
             dataSource.IsLineColorSelected = true;
             break;
         case MODE.FONT:
             dataSource.IsFontColorSelected = true;
             break;
         case MODE.FILL:
             dataSource.IsFillColorSelected = true;
             break;
         default:
             currMode = MODE.NONE;
             break;
     }
     UpdateCurrMode();
 }
开发者ID:nus-fboa2016-PL,项目名称:PowerPointLabs,代码行数:23,代码来源:ColorPane.cs


示例19: Update

    // Update is called once per frame
    protected virtual void Update()
    {
        if (m_waitChangeMode > 0) {
            m_waitChangeMode--;
        }

        if (m_waitChangeMode <= 0) {
            m_waitChangeMode	= WAIT_CHANGE_MODE;
            int _mode			= Random.Range(0,2);
            m_mode				= (MODE)_mode;
        }

        switch (m_mode) {
        case MODE.MODE_IDLE:
            break;
        case MODE.MODE_WALK:
            if (m_onGround) {
                Vector3 _direction		= (player.transform.position - transform.position).normalized;
                this.rigidbody.velocity	= _direction * POWER_MOVE;
            }
            break;
        case MODE.MODE_DESTROY:
            if (m_waitDestroy > 0) {
                m_waitDestroy--;
            }

            if (m_waitDestroy <= 0) {
                spawnerRubble.GetComponent<spawnRubble>().SpawnRubbleMulti(NUMBER_RUBBLE,transform.position);

                scene.GetComponent<CGame>().AddScore(SCORE_ENEMY);

                Destroy(gameObject);
            }
            break;
        }
    }
开发者ID:hagura,项目名称:unity_chiruno02,代码行数:37,代码来源:behaviorEmeny.cs


示例20: FMOD_System_CreateStream

 private static extern RESULT FMOD_System_CreateStream(IntPtr system, byte[] name_or_data, MODE mode, int exinfo, ref IntPtr sound);
开发者ID:huming2207,项目名称:ghgame,代码行数:1,代码来源:fmod.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MONITORINFO类代码示例发布时间:2022-05-24
下一篇:
C# MKMapView类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap