示例#1
0
    // // // // // // // // // // // // // // // // // // // // // // // // // // // //
    // MAIN CONSTRUCTOR																 //
    // // // // // // // // // // // // // // // // // // // // // // // // // // // //
    public MainWindow() : base(Gtk.WindowType.Toplevel)
    {
        // Build window
        Build();

        // Start internet connectivity periodic check
        Connection.StartCheck();

        // drawing framework setup
        // Input 1: Coloumns
        // Input 2: Rows
        // Input 3: Swipe Times
        DrawAssembly.Setup(4, 3, 1);

        // Create space for max widgets
        WidgetContainer.AssignWidgetSpace(MAX_WIDGETS);

        // Instantiate widgets from widget construct
        WidgetConstruct.ConstructWidgets();


        // initiate user settings
        UserSettings.Initiate();

        // starts data gathering
        CurrentData.StartDataGathering();


        GraphContainer.CreateGraphs();

        // Setup main update timer
        MainUpdate           = new Timer(10);
        MainUpdate.Elapsed  += new ElapsedEventHandler(OnUpdate);
        MainUpdate.Enabled   = true;
        MainUpdate.AutoReset = true;

        // Setup events
        mainDrawingArea.ButtonPressEvent += new ButtonPressEventHandler(HandlePress);
        mainDrawingArea.AddEvents((int)EventMask.AllEventsMask);
    }