public FormMain() { InitializeComponent(); // // Creation of Host uc to be added to the form window. // this.ucHost = new UcHost(); // // ucHost parameters // this.ucHost.Dock = System.Windows.Forms.DockStyle.Fill; this.ucHost.Location = new System.Drawing.Point(0, 0); this.ucHost.Name = "UcHost"; if (MySystem.IsAdmin()) { this.Text += " - Admin mode"; this.Height = 290; this.Width = 535; } else { // We hide Admin controls this.Text += " - User mode"; this.Height = 255; this.Width = 535; } // Adding controls this.Controls.Add(this.ucHost); }
static void Main(string[] args) { var mySystem = new MySystem( new UsersCache(), new RadioCache(), new GroupCache()); var result = mySystem.QueryWith(WhateverQuery()); result.SendToUser(); }
// Update is called once per frame void Update() { //spaceで再生 if (Input.GetKeyDown(KeyCode.Space) && !isPlay) { audioSource.Play(); isPlay = true; startTime = Time.time; text.text = "再生中!!"; now_noteNum = 0; } //曲が再生されてない if (audioSource.time == 0.0f && !audioSource.isPlaying) { text.text = "Spaceキーで再生"; isPlay = false; return; } //--経過時間からリストを参照-- //ノーツ MidiSystem.Aftr_NoteData note_pick = MidiSystem.NoteDataPick(now_noteNum, Time.time - startTime, FAST_SECOND); if (note_pick.msTime == MidiSystem.NON) { return; } //テンポ var temp_pick = MidiSystem.TempDataPick(Time.time - startTime); //--生成-- //位置 this.transform.position = new Vector3(transform.position.x, thisObj_initY + temp_pick.speed * FAST_SECOND, transform.position.z); //速く出現する時の初期位置 速さによってn秒前の場所が変わるので float noteY = MidiSystem.NotesPosition_Y(now_noteNum, Time.time - startTime, FAST_SECOND, temp_pick.speed, note_pick.Length); var noteInst = Instantiate(notes, new Vector3(transform.position.x + note_pick.leanNum, transform.position.y + noteY, transform.position.z), Quaternion.identity); noteInst.gameObject.GetComponent <NotesView>().SetValue(temp_pick.speed, MySystem.Get_ScreenBottomRight(camera).y); noteInst.gameObject.transform.localScale = new Vector3(transform.localScale.x, note_pick.Length, transform.localScale.z); //色 if (note_pick.ch >= colors.Length) //配列以上は無色 { noteInst.GetComponent <SpriteRenderer>().color = colors[colors.Length - 1]; } else { noteInst.GetComponent <SpriteRenderer>().color = colors[note_pick.ch]; } now_noteNum++; }
private static bool Handler(CtrlType sig) { Console.WriteLine("Exiting system due to external CTRL-C, or process kill, or shutdown"); //do your cleanup here MySystem.Terminate(); Console.WriteLine("Cleanup complete"); //allow main to run off exitSystem = true; //shutdown right away so there are no lingering threads Environment.Exit(-1); return(true); }
public override void OnNext(MySystem.GameStateManager value) { }
static void Main(string[] args) { string pattern = @"(\w+)(\((.*?)\))?"; string inputLine = Console.ReadLine(); Regex regex = new Regex(pattern); while (inputLine != "System Split") { Match matcher = regex.Match(inputLine); if (matcher.Groups[1].Value == "RegisterPowerHardware") { string hardwareType = "Power"; string[] hardwareData = matcher.Groups[3].Value.Split(','); string hardwareName = hardwareData[0].Trim(); int hardwareCapacity = int.Parse(hardwareData[1].Trim()); int hardwareMemory = int.Parse(hardwareData[2].Trim()); Hardware hardware = new PowerHardware(hardwareName, hardwareType, hardwareCapacity, hardwareMemory); MySystem.RegisterHardware(hardware); } else if (matcher.Groups[1].Value == "RegisterHeavyHardware") { string hardwareType = "Heavy"; string[] hardwareData = matcher.Groups[3].Value.Split(','); string hardwareName = hardwareData[0].Trim(); int hardwareCapacity = int.Parse(hardwareData[1].Trim()); int hardwareMemory = int.Parse(hardwareData[2].Trim()); Hardware hardware = new HeavyHardware(hardwareName, hardwareType, hardwareCapacity, hardwareMemory); MySystem.RegisterHardware(hardware); } else if (matcher.Groups[1].Value == "RegisterExpressSoftware") { string softwareType = "ExpressSoftware"; string[] softwareData = matcher.Groups[3].Value.Split(','); string hardwareComponentName = softwareData[0].Trim(); string softwareName = softwareData[1].Trim(); int softwareCapacityConsumption = int.Parse(softwareData[2].Trim()); int softwareMemoryconsumption = int.Parse(softwareData[3].Trim()); Software software = new ExpressSoftware(softwareName, softwareType, softwareCapacityConsumption, softwareMemoryconsumption); MySystem.RegisterSoftware(hardwareComponentName, software); } else if (matcher.Groups[1].Value == "RegisterLightSoftware") { string softwareType = "LightSoftware"; string[] softwareData = matcher.Groups[3].Value.Split(','); string hardwareComponentName = softwareData[0].Trim(); string softwareName = softwareData[1].Trim(); int softwareCapacityConsumption = int.Parse(softwareData[2].Trim()); int softwareMemoryconsumption = int.Parse(softwareData[3].Trim()); Software software = new LightSoftware(softwareName, softwareType, softwareCapacityConsumption, softwareMemoryconsumption); MySystem.RegisterSoftware(hardwareComponentName, software); } else if (matcher.Groups[1].Value == "ReleaseSoftwareComponent") { string[] dataForSoftwareRelease = matcher.Groups[3].Value.Split(','); string hardwareComponentName = dataForSoftwareRelease[0].Trim(); string softwareComponentName = dataForSoftwareRelease[1].Trim(); MySystem.ReleaseSoftowareComponent(hardwareComponentName, softwareComponentName); } else if (matcher.Groups[1].Value == "Analyze") { MySystem.Analyze(); } inputLine = Console.ReadLine(); } MySystem.SystemSplit(); }
public void Dispose() { Fiber.Stop(); MySystem.DisposeActor(ActorRef.Key); }
public static int Main() { MySystem mySystem = new MySystem(); return(0); }
public static int Main () { MySystem mySystem = new MySystem (); return 0; }
public Engine(LCForm _LC) { LC = _LC; MySystem.SetAssociation(".lcproject", "LOCAL_CODER", Application.ExecutablePath, "Local Coder Project"); }
public virtual void Inject(MySystem _system) { mySystem = _system; }
public static void Main() { MySystem mySystem = new MySystem(); Console.WriteLine("<%END%>"); }
private static void Main(string[] args) { var mySystem = new MySystem(); mySystem.Execute(); }
void Start() { MidiSystem.ReadMidi(midiPath, BASE_SCALE, magniSpead); text.text = "Spaceキーで再生"; thisObj_initY = MySystem.Get_ScreenTopLeft(camera).y; }