Esempio n. 1
0
        public MainFormWorker(ref SingerWindow sw, ref AttributesWindow aw, ref TrackerWindow tw, ref UndoAbility ua)
        {
            this.sw = sw;
            this.aw = aw;
            this.tw = tw;
            this.ua = ua;
            tw.BindAttributeWindow(aw);
            sw.BindAttributeWindow(aw);
            tw.ShowingEditorChanged     += tw_ShowingEditorChanged;
            tw.SelectingPartChanged     += tw_SelectingPartChanged;
            tw.SelectingWavePartChanged += tw_SelectingWavePartChanged;
            tw.TotalTimePosChange       += tw_TotalTimePosChange;
            tw.AfterTrackNormalize      += tw_AfterTrackNormalize;
            sw.TotalTimePosChange       += sw_TotalTimePosChange;
            sw.FormClosing += child_FormClosing;
            tw.FormClosing += child_FormClosing;
            aw.FormClosing += child_FormClosing;
            sw.BaseController.NoteActionEnd += BaseController_NoteActionEnd;
            //sw.BaseController.

            playworker.TimeChange   += playworker_TimeChange;
            playworker.StatusChange += playworker_StatusChange;

            aw.ChannelVolumeChanged += aw_ChannelVolumeChanged;
            aw.GlobalVolumeChanged  += aw_GlobalVolumeChanged;
        }
Esempio n. 2
0
        static void Main()
        {
            //AllocConsole();

            GameState current_gamestate = new GameState();  // TODO We probably want to save this and load it on startup so it's immediately up to date instead of blank.

            TrackerWindow view = new TrackerWindow(current_gamestate);

            // Get position from settings file and set the window position to those coordinates.
            view.Left = double.Parse(ConfigController.GetConfig("xpos", "100"));
            view.Top  = double.Parse(ConfigController.GetConfig("ypos", "100"));

            // Set the background colour to the value in the config file. If not valid, set it to the default value.
            string bgcolour = ConfigController.GetConfig("BackgroundColour", "#FF4D4D4D");

            if (System.Text.RegularExpressions.Regex.IsMatch(bgcolour, @"^#\w{8}$"))
            {
                view.MainGrid.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString(bgcolour));
            }
            else
            {
                view.MainGrid.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF4D4D4D"));
            }

            Controller controller = new Controller(current_gamestate, view);

            TrackFileWatcher.Run(controller);
            SeedFileWatcher.Run(controller);

            Application app = new Application();

            app.Run(view);
        }
        public void KeepTickPosShown(long TickPos)
        {
            if (TickPos < TrackerWindow.MinShownTick || TickPos > TrackerWindow.MaxShownTick)
            {
                TrackerWindow.setPianoStartTick(TickPos);
            }
//        TrackerWindow.MinShownTick || e.Tick > TrackerWindow.MaxShownTick
        }
Esempio n. 4
0
    static void Main()
    {
        GameState     model     = new GameState();
        TrackerWindow view      = new TrackerWindow();
        Controler     controler = new Controler(model, view);

        FileWatcher Watcher = new FileWatcher(controler);

        Watcher.Run();

        Application app = new Application();

        app.Run(view);
    }
Esempio n. 5
0
        public UndoAbility(ref SingerWindow sw, ref AttributesWindow aw, ref TrackerWindow tw)
        {
            this.sw = sw;
            this.aw = aw;
            this.tw = tw;
            tw.ShowingEditorChanged += tw_ShowingEditorChanged;

            sw.BaseController.NoteActionBegin  += BaseController_NoteActionBegin;
            sw.BaseController.NoteActionEnd    += BaseController_NoteActionEnd;
            sw.BaseController.DynActionBegin   += BaseController_DynActionBegin;
            sw.BaseController.DynActionEnd     += BaseController_DynActionEnd;
            sw.BaseController.PitchActionBegin += BaseController_PitchActionBegin;
            sw.BaseController.PitchActionEnd   += BaseController_PitchActionEnd;

            tw.BaseController.TrackerActionBegin += Track_View_TrackerActionBegin;
            tw.BaseController.TrackerActionEnd   += Track_View_TrackerActionEnd;

            tw.BaseController.BeforeTrackNormalize += Track_View_BeforeTrackNormalize;
            tw.BaseController.AfterTrackNormalize  += BaseController_AfterTrackNormalize;

            aw.AttributeChange += aw_AttributeChange;
        }
Esempio n. 6
0
 public Controler(GameState model, TrackerWindow view)
 {
     Model = model;
     View  = view;
 }