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"); }
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; }
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; }
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); }
public StopwatchCS() { timer = new Stopwatch(); timer.Reset(); displayFrozen = false; currentMode = MODE.DateTime; }
/// <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; } }
public SupportNoteDialog(SupportStatWindow stat_windows, bool is_break, SupportNote editing_note) : this() { this.mode = MODE.EDIT; this.stat_windows = stat_windows; this.IS_BREAK = (is_break ? "Y" : "N"); this.note = editing_note; }
// Use this for initialization void Start() { m_strong = StrongDefault; m_mode = MODE.MODE_WALK; m_waitChangeMode = WAIT_CHANGE_MODE; m_waitDestroy = WAIT_DESTROY; }
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); } }
public Motor(int xDim, int yDim) { mode = MODE.OFF; m = xDim; n = yDim; total = m * n; A = new int[m, n]; }
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!"); }
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); } }
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); }
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; }
// Use this for initialization void Start() { Mode = SceneChanger.Mode; Application.logMessageReceived += _Log; #if !UNITY_STANDALONE_WIN Regulus.Utility.SpinWait.NotWindowsPlatform(); #endif var client = new Regulus.Framework.Client<Regulus.Project.ItIsNotAGame1.IUser>(Console, Console.Command ); client.ModeSelectorEvent += _ToMode; _Client = client; _Updater.Add(_Client); Debug.Log("Started ."); }
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; } }
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); } }
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; } } }
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!"); }
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(); }
// 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; } }
public RESULT setMode(MODE mode) { return(Channel.FMOD_Channel_SetMode(channelraw, mode)); }
/// <summary> /// オペラブックマークのパース処理 /// </summary> /// <param name="root"></param> /// <param name="reader"></param> void ParseOperaBookMark(ref Folder root, StringReader reader) { // 操作用のカレントフォルダ Folder CurrentFolder = Root; Address WorkAddress = null; string work = reader.ReadLine(); while (work != null) { switch (mMode) { case MODE.eNone: if (work.Contains("#FOLDER")) { Folder folder = new Folder(); folder.Parent = CurrentFolder; CurrentFolder.Folders.Add(folder); CurrentFolder = folder; mMode = MODE.eCreateFolder; } else if (work.Contains("#URL")) { Address address = new Address(); CurrentFolder.Addresses.Add(address); WorkAddress = address; mMode = MODE.eCreateAddress; } else if (work.Equals("-")) { if (CurrentFolder.Parent != null) { CurrentFolder = CurrentFolder.Parent; } else { if (!CurrentFolder.Name.Equals("Root")) { // フォーマットが想定外。例外出力してコード組み直し throw new FormatException(); } } } break; case MODE.eCreateFolder: if (work.Contains("NAME=")) { string name = Regex.Replace(work, "\tNAME=", ""); CurrentFolder.Name = name; mMode = MODE.eNone; } break; case MODE.eCreateAddress: if (work.Contains("NAME=")) { string name = Regex.Replace(work, "\tNAME=", ""); WorkAddress.Name = name; } if (work.Contains("URL=")) { string url = Regex.Replace(work, "\tURL=", ""); WorkAddress.URL = url; } if (WorkAddress.IsComplete()) { WorkAddress = null; mMode = MODE.eNone; } break; } work = reader.ReadLine(); } }
public SystemRet(MODE _mode) : base() { mode = _mode; }
public ReadCounters(MODE _mode) : base() { opcount = 0; mode = _mode; }
public RESULT getMode(ref MODE mode) { return(Channel.FMOD_Channel_GetMode(channelraw, ref mode)); }
public void SetMode(MODE m) { RemoveHex2Char(); this.mode = m; SetHex2Char(); }
public void StageInfoRender(int StageNum)//ステージの詳細を押したら { eSceneMode = MODE.StageInfo; InfoText.text = "消費APは" + StageInfoList[StageNum][1].ToString(); PlayStageNum = StageNum; }
internal static RESULT CreateSound(string strFileName, ref Sound sound, MODE mode = MODE._2D | MODE.LOOP_OFF | MODE.CREATESAMPLE) { string strFile = GetExtension(strFileName); return(strFile == null ? RESULT.ERR_FILE_NOTFOUND : system.createSound(strFile, mode, out sound)); }
public RESULT getMode(ref MODE mode) { return FMOD_Sound_GetMode(soundraw, ref mode); }
private static extern RESULT FMOD_Sound_SetMode(IntPtr sound, MODE mode);
/// <summary> /// 確定ボタン /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnApply_Click(object sender, EventArgs e) { #region チェック try { ErrorCheck(); } catch (InputException ex) { //処理実行 MessageBox.Show(ex.Message); ex.ERROR_TEXTBOX.Focus(); // error_code=3はデータをリストアせずに終了 if (ex.ERROR_CODE == GlobalDefine.ERROR_CODE[3].code) { return; } // テキストボックス内の文字列を、更新前に戻す RestoreRecordData(ex.ERROR_TEXTBOX); return; } #endregion // チェックして問題なければ、DBレコード追加or更新 switch (this.mode) { // 新規作成モード case MODE.ADD: if (base.AskMessageBox(GlobalDefine.MESSAGE_ASK_REGISTRATION)) { DBAdapter dba = SingletonObject.GetDbAdapter(); int newId; // 新規ID取得(MAX値+1) newId = int.Parse(dba.GetMaxID("DIVISION_ID", "BOOK_GENRE_MASTER")) + 1; // 0埋めして新規ID作成 string newIdText = string.Format("{0:D3}", newId); string query = string.Format("INSERT INTO BOOK_GENRE_MASTER VALUES('{0}','{1}')", newIdText, this.textName.Text); // DBにインサート文を投げる dba.nonExecSQL(query); // 完了メッセージを出力 MessageBox.Show(GlobalDefine.MESSAGE_COMPLETE_REGISTRATION); // 画面起動時に保持した変数を、現在の画面の値に更新 BeforeRecordData(); // IDを画面に表示 this.textId.Text = newIdText; // 編集モードに変更 this.mode = MODE.MOD; // 編集モードでダイアログ作り直す(DataRowデータは渡さない) InitDailog(this.mode); } break; // 編集モード case MODE.MOD: if (base.AskMessageBox(GlobalDefine.MESSAGE_ASK_UPDATE)) { DBAdapter dba = SingletonObject.GetDbAdapter(); string query = string.Format("UPDATE BOOK_GENRE_MASTER SET DIVISION_NAME='{1}' WHERE DIVISION_ID='{0}'", this.textId.Text, this.textName.Text); // DBにインサート文を投げる dba.nonExecSQL(query); // 完了メッセージを出力 MessageBox.Show(GlobalDefine.MESSAGE_COMPLETE_UPDATE); // 画面起動時に保持した変数を、現在の画面の値に更新 BeforeRecordData(); } break; } }
public Filter(List <string> filterList, MODE mode = MODE.ALLOW) : base("Filter", null) { this.filterList = filterList; this.mode = mode; }
public void Setup(MODE mode) { this.udp_client = new UDP_PACKETS_CLIANT.UDP_PACKETS_CLIANT(this.remoteIP, this.serverPort, this.myPort); this.mode = mode; this.Connect(); }
public FruitTypeForm(MODE mode) { InitializeComponent(); _mode = mode; }
private void loadConfiguration() { this._validationMode = _configuartion.ChainValidationMode; this.cbValidationMode.SelectedItem = this._validationMode.ToString(); }
public RESULT createStream(string name_or_data, MODE mode, ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; mode = mode | FMOD.MODE.UNICODE; try { result = FMOD_System_CreateStream(systemraw, name_or_data, mode, 0, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }
private static extern RESULT FMOD_Channel_GetMode(IntPtr channel, ref MODE mode);
public void StageSelectBack()//StageSelectに戻る { eSceneMode = MODE.Select; }
private static extern RESULT FMOD_System_CreateStream(IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref IntPtr sound);
private static extern RESULT FMOD5_Channel_SetMode(IntPtr channel, MODE mode);
private void Window_Loaded(object sender, RoutedEventArgs e) { modeType = MODE.NewItem; BindingProcess(); }
protected override void OnWindow(int id) { if (Log.IsLogable(Log.LEVEL.TRACE)) { Log.Trace("drawing of decoration board started (mode=" + mode + ")"); } GUILayout.BeginVertical(); // detailed statistics GUILayout.BeginVertical(HighLogic.Skin.scrollView); GUILayout.BeginHorizontal(); GUILayout.Label(entry != null ? entry.GetName() : "", FFStyles.STYLE_BUTTON); CloseButton(); GUILayout.EndHorizontal(); DrawStatistics(); GUILayout.EndVertical(); // decorations GUILayout.BeginHorizontal(); GUILayout.Label("Decorations", FFStyles.STYLE_TITLE_LABEL); GUILayout.FlexibleSpace(); switch (mode) { case MODE.DISPLAY: if (FinalFrontier.configuration.IsRevocationOfRibbonsEnabled()) { if (GUILayout.Button("Revocation", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.REVOCATION; } } if (GUILayout.Button("Award Ribbon", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.AWARD; } break; case MODE.AWARD: if (FinalFrontier.configuration.IsRevocationOfRibbonsEnabled()) { if (GUILayout.Button("Revocation", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.REVOCATION; } } if (GUILayout.Button("Show Ribbons", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.DISPLAY; } break; case MODE.REVOCATION: if (FinalFrontier.configuration.IsRevocationOfRibbonsEnabled()) { if (GUILayout.Button("Show Ribbons", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.DISPLAY; } } if (GUILayout.Button("Award Ribbon", FFStyles.STYLE_NARROW_BUTTON)) { mode = MODE.AWARD; } break; } GUILayout.EndHorizontal(); scrollPosRibbons = GUILayout.BeginScrollView(scrollPosRibbons, FFStyles.STYLE_SCROLLVIEW, GUILayout.Width(RIBBON_DISPLAY_WIDTH), GUILayout.Height(RIBBON_DISPLAY_HEIGHT)); switch (mode) { case MODE.DISPLAY: DrawRibbons(); break; case MODE.AWARD: // draw warning if not in flight if (HighLogic.LoadedScene == GameScenes.FLIGHT || FinalFrontier.configuration.IsCustomRibbonAtSpaceCenterEnabled()) { DrawCustomAwardDialog(); } else { DrawWarningDialog(); } break; case MODE.REVOCATION: DrawRevocationDialog(); break; } GUILayout.EndScrollView(); // logbook GUILayout.Label("Logbook", FFStyles.STYLE_TITLE_LABEL); scrollPosLogbook = GUILayout.BeginScrollView(scrollPosLogbook, FFStyles.STYLE_SCROLLVIEW, GUILayout.Width(RIBBON_DISPLAY_WIDTH), GUILayout.Height(RIBBON_LOGBOOK_HEIGHT)); GUILayout.Box(entry.GetLogText(), STYLE_LOGBOOK_BOX); GUILayout.EndScrollView(); GUILayout.EndVertical(); // DragWindow(); if (Log.IsLogable(Log.LEVEL.TRACE)) { Log.Trace("drawing decoration of board finished"); } }
void BagRadioClicked() //背包按钮点击 { EnchaseMode = MODE.TAB_Bag; Update_EnchaseEquip(); }
void RoleRadioClicked() //角色按钮点击 { EnchaseMode = MODE.TAB_Role; Update_EnchaseEquip(); }
public RESULT setMode(MODE mode) { return(FMOD5_Channel_SetMode(handle, mode)); }
public SystemCall(MODE _mode) : base() { mode = _mode; }
public RESULT getMode(out MODE mode) { return(FMOD5_Channel_GetMode(handle, out mode)); }
public bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix, ref float deltaMatrix, ref float snap, ref float localBounds, ref float boundsSnap) { fixed(float *native_view = &view) { fixed(float *native_projection = &projection) { fixed(float *native_matrix = &matrix) { fixed(float *native_deltaMatrix = &deltaMatrix) { fixed(float *native_snap = &snap) { fixed(float *native_localBounds = &localBounds) { fixed(float *native_boundsSnap = &boundsSnap) { byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, native_deltaMatrix, native_snap, native_localBounds, native_boundsSnap); return(ret != 0); } } } } } } } }
private void OnTriggerEnter2D(Collider2D collision) { score++; tmp.text = $"{score}"; if (score > record && !isRecord) { isRecord = true; recordText.SetActive(true); audioManager.Play("record"); } curSwitchCount--; if (curSwitchCount <= 0) { audioManager.Play("powerup"); wallSpawner.IncreaseSpeed(); curSwitchCount = switchCount; //switch next mode switch (CurrentPlaymode) { case PLAYMODE.EASY: break; case PLAYMODE.HARD: rigidbody.velocity = Vector2.zero; CurrentMode = CurrentMode == MODE.NORMAL ? MODE.REVERSE : MODE.NORMAL; Physics2D.gravity *= -1; break; case PLAYMODE.ULTRA: switch (CurrentMode) { case MODE.NORMAL: rigidbody.velocity = Vector2.zero; CurrentMode = MODE.REVERSE; Physics2D.gravity *= -1; break; case MODE.REVERSE: Camera.main.transform. rotation = Quaternion.Euler(0f, 0f, 180f); rigidbody.velocity = Vector2.zero; CurrentMode = MODE.FULLREVERSE; break; case MODE.FULLREVERSE: Camera.main.transform .rotation = Quaternion.Euler(0f, 0f, 0f); rigidbody.velocity = Vector2.zero; CurrentMode = MODE.NORMAL; Physics2D.gravity *= -1; break; } break; case PLAYMODE.INSANE: switch (CurrentMode) { case MODE.NORMAL: rigidbody.velocity = Vector2.zero; CurrentMode = MODE.REVERSE; Physics2D.gravity *= -1; break; case MODE.REVERSE: Camera.main.transform. rotation = Quaternion.Euler(0f, 0f, 180f); rigidbody.velocity = Vector2.zero; CurrentMode = MODE.FULLREVERSE; break; case MODE.FULLREVERSE: rigidbody.velocity = Vector2.zero; CurrentMode = MODE.FULLREVERSE2; Physics2D.gravity *= -1; break; case MODE.FULLREVERSE2: Camera.main.transform. rotation = Quaternion.Euler(0f, 0f, 0f); rigidbody.velocity = Vector2.zero; CurrentMode = MODE.NORMAL; break; } break; } } }
private static extern RESULT FMOD_Channel_SetMode(IntPtr channel, MODE mode);
public bool Manipulate(ref float view, ref float projection, OPERATION operation, MODE mode, ref float matrix) { float *deltaMatrix = null; float *snap = null; float *localBounds = null; float *boundsSnap = null; fixed(float *native_view = &view) { fixed(float *native_projection = &projection) { fixed(float *native_matrix = &matrix) { byte ret = ImGuizmoNative.ImGuizmo_Manipulate(native_view, native_projection, operation, mode, native_matrix, deltaMatrix, snap, localBounds, boundsSnap); return(ret != 0); } } } }
public RESULT setMode(MODE mode) { return FMOD_Sound_SetMode(soundraw, mode); }
public void setMode(string modeStr) { MODE newMode = (MODE)System.Enum.Parse(typeof(MODE), modeStr); mode = newMode; }
public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; try { result = FMOD_System_CreateStream(systemraw, data, mode, ref exinfo, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }
/// <summary> /// The constructor. /// </summary> /// <param name="args">Optionally, specifies the arguments to parse.</param> public Parameters(string[] args = null) { if (args == null) { return; } foreach (string strArg in args) { if (strArg == "-help") { Console.WriteLine("Command Line: -iter:4000 -batch:32 -steps:100 -hidden:15 -dropout:0.2 -lr:0.002 -type:CAFFE|CUDNN -newwts:True -mode:[TRAIN|RUN]"); m_bHelp = true; return; } if (getIntParam("-iter", strArg, ref m_nIterations)) { continue; } if (getIntParam("-batch", strArg, ref m_nBatch)) { continue; } if (getIntParam("-steps", strArg, ref m_nTimeSteps)) { continue; } if (getIntParam("-hidden", strArg, ref m_nHidden)) { continue; } if (getDoubleParam("-dropout", strArg, ref m_dfDropout)) { continue; } if (getDoubleParam("-lr", strArg, ref m_dfLearningRate)) { continue; } if (getStringParam("-type", strArg, ref m_strType)) { continue; } string strMode = ""; if (getStringParam("-mode", strArg, ref strMode)) { if (strMode == MODE.RUN.ToString()) { m_mode = MODE.RUN; } else { m_mode = MODE.TRAIN; } continue; } if (getBoolParam("-newwts", strArg, ref m_nNewWeights)) { continue; } } getLstmType(); }
private static extern RESULT FMOD_System_CreateSound(IntPtr system, string name_or_data, MODE mode, int exinfo, ref IntPtr sound);
private int pinModeIndex = 1; // default: MODE.OUTPUT public PinViewModel(PinModel model, int pinNo, MODE mode = MODE.OUTPUT) { this.pinModel = model; this.pin = pinNo; this.PinMode = mode; }
private static extern RESULT FMOD_System_CreateStream(IntPtr system, byte[] name_or_data, MODE mode, int exinfo, ref IntPtr sound);
public void scan_Click(object sender, EventArgs e, MODE _MODE) { List <string> streamdata = new List <string>(); bool hasFile = this.CurrentFileList.Count > 0; bool hasFolder = this.CurrentFolderList.Count > 0; if (hasFile || hasFolder) { int sum_result = 0; //if (hasFolder) //{ // Interaction.MsgBox("start scanning folder list", MsgBoxStyle.OkOnly, "scan clicked"); // foreach (string folder in this.CurrentFolderList) // { // streamdata.AddRange(this.core.ScanFolder(ref processor, ref err, folder, ref this.audioList)); // } //} if (hasFile) { //if(_MODE == MODE.NORMAL) Interaction.MsgBox("start scanning files list", MsgBoxStyle.OkOnly, "scan clicked"); foreach (string file in this.CurrentFileList) { if (_MODE == MODE.QUIET) { streamdata.AddRange(this.core.UseFile(ref processor, file, ref err, ref this.audioList, MODE.QUIET)); } if (_MODE == MODE.NORMAL) { streamdata.AddRange(this.core.UseFile(ref processor, file, ref err, ref this.audioList, MODE.NORMAL)); } //Interaction.MsgBox("tra ve "+ this.core.UseFile(ref processor, file, ref err, ref this.audioList).Count , MsgBoxStyle.OkOnly, " test return 2 cap"); } } sum_result += streamdata.Count; string listFileScanned = ""; string listFolderScanned = ""; int i = 0; int noFile = this.CurrentFileList.Count; int noFolder = this.CurrentFolderList.Count; for ( ; i < noFile && i < 5; i++) { listFileScanned += "\n" + CurrentFileList[i]; } if (noFile > 5) { listFileScanned += "\n..."; } for (i = 0; i < noFolder && i < 5; i++) { listFolderScanned += "\n" + CurrentFolderList[i]; } if (noFolder > 5) { listFolderScanned += "\n..."; } /*if (sum_result > 0) if (_MODE == MODE.NORMAL) Interaction.MsgBox("Scan completed\n" + * "Found " + sum_result + " streams in folders:" + * listFolderScanned + "\nAnd files:" + * listFileScanned * ,MsgBoxStyle.OkOnly, "Scan sum_result (after word found)"); */ string audio = ""; foreach (string audiofile in this.audioList) { audio += audiofile + "\n"; } audio += this.audioList.Count.ToString(); //if (_MODE == MODE.NORMAL) Interaction.MsgBox(audio, MsgBoxStyle.OkOnly, "Audio list from scan_click"); //if(sum_result == 0 &&_MODE == MODE.NORMAL) Interaction.MsgBox("No stream detected", MsgBoxStyle.OkOnly, "Scan result fail"); foreach (string data in streamdata) { //insert bao datagrid rowObject dataOfAudioFromName = new rowObject(data); this.addtodatagrid(dataOfAudioFromName); } } else if (_MODE == MODE.NORMAL) { string message1 = "Nothing to scan"; string message2 = "Do you want to open a pcap file ?"; chooseFileOrFolderToScan msgbox = new chooseFileOrFolderToScan(message1, message2, this); msgbox.ShowDialog(); //this.scan_Click(sender, err, MODE.NORMAL); } }