private void pictureBox1_Click(object sender, EventArgs e)
    {
      if (m_dt == null || m_controlType == null)
      {
        MessageBox.Show("You need to call 'Create' on the ShowChartSeparateControl with argument so that it knows how to instantiate the chart.");
        return;
      }

      Control c;

      if ((c = Activator.CreateInstance(m_controlType) as Control) == null)
        return;

      ((IChartHolder)c).Chart.DataSource = m_dt;

      ShowForm sf = new ShowForm();

      sf.FormBorderStyle = FormBorderStyle.Sizable;
      sf.Text = c.Text;
      sf.ProcessLookFeel = false;
      sf.Create(c);

      sf.Show();
      sf.BringToFront();

      //.ShowForm.Show(c, FormBorderStyle.Sizable, null, m_title);
    }
Пример #2
0
    static void Main()
    {
      SI.Controls.LookFeel.SetupJamesPurple();
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      Logger.SetLog4NetGlobalContextProperty("LogFileName", "SI.BSA.HK");
      Logger.SetLog4NetGlobalContextProperty("LogFileDir",
        string.Format("{0}\\BSA", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();

      Logger.Debug("Logging up and running", typeof(Program));

      var nMathPath = LocationFinder.GetLocation() == LocationFinder.Location.LN
              ? @"\\symnasuk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative"
              : @"\\symnashk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative";
      Logger.InfoFormat(typeof(Program), "NMathNativeLocation set to: {0}", nMathPath);
      NMathConfiguration.NativeLocation = nMathPath;

      SI.Controls.ShowForm.DefaultIcon = BSAResources.PurpleGlobal;

      if (!SymmetryEnvironment.IsInSymmetryDomain)
      {
        DialogResult result;

        using (var loginForm = new SI.Controls.LoginForm())
          result = loginForm.DisplayInShowFormDialog("BSA Login please", null);

        if (result != DialogResult.OK)
          return;
      }

      if (!Permissioning.UserIsPermissioned(SymmetryEnvironment.UserName))
        return;

      ShowForm sf = new ShowForm
      {
        Text =
          string.Format("BSA - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      sf.Create(new MainContainer());


      Application.Run(sf);

      SI.Strategy.BondSpreadAnalysis.Carbon.CarbonSubscriber.DisposeInstance();

    }
Пример #3
0
    protected override void innerLaunch()
    {
      LookFeel.SetupNoirModerneLookFeel();

      var sf = new ShowForm
      {
        Text = "SI.RollMonitor"
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);
    }
 private void ButtonEditOnClick(object sender, EventArgs e)
 {
     try
     {
         var csEditView = new CustomSeriesEditorView { ViewModel = csEditViewModel };
         if (csEditoForm == null || csEditoForm.IsDisposed)
             csEditoForm = ShowForm.Show(csEditView, FormBorderStyle.FixedSingle, null, "Custom Series Editor");
         else
             csEditoForm.BringToFront();
     }
     catch (Exception ex)
     {
         displayMessage("Custom Series Editor Error", ex.Message, MessageBoxIcon.Error);
     }
     
 }
Пример #5
0
    protected override void innerLaunch()
    {
      SI.Controls.LookFeel.SetupNoirModerneLookFeel();
      setupNMath();
      SI.Controls.ShowForm.DefaultIcon = SI.Controls.Util.BmpToIcon(SI.Launcher.Properties.Resources.keyImage);
      ShowForm sf = new ShowForm
      {
        Text =
          string.Format("{0} - {1}", Application.ProductName,
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };
      sf.Create(new Strategy.RatesSpreads.Display.MainControl());

      Application.Run(sf);

    }
Пример #6
0
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SI.Dashboard.HK", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();
      Logger.Debug("Logging up and running", typeof(Program));

      var nMathPath = LocationFinder.GetLocation() == LocationFinder.Location.LN
              ? @"\\symnasuk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative"
              : @"\\symnashk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative";
      Logger.InfoFormat(typeof(Program), "NMathNativeLocation set to: {0}", nMathPath);
      NMathConfiguration.NativeLocation = nMathPath;

      if (!SymmetryEnvironment.IsInSymmetryDomain)
      {
        DialogResult result;

        using (var loginForm = new SI.Controls.LoginForm())
          result = loginForm.DisplayInShowFormDialog("Dashboard Login please", null);

        if (result != DialogResult.OK)
          return;
      }

      ShowForm.DefaultIcon = DashboardResources.Dashboard_01;

      var sf = new ShowForm
      {
        Text =
          string.Format("SI.Dashboard - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.DoEvents();

      Application.Run(sf);
    }
Пример #7
0
    public static ShowForm Show(Control c_,FormBorderStyle borderStyle_,Icon icon_, string title_)
    {
      ShowForm sf = new ShowForm();

      sf.FormBorderStyle = borderStyle_;
      sf.Text = title_;
      sf.Create(c_);
      sf.Icon = icon_;
      if (icon_ == null && c_ is IFormIconProvider)
        sf.Icon = ((IFormIconProvider)c_).FormIcon;
      else
        sf.Icon = DefaultIcon;

      sf.Show();
      sf.BringToFront();

      return sf;
    }
Пример #8
0
    static void Main()
    {
      AppDomain.CurrentDomain.UnhandledException+=handleUnhandledException;
      
      SI.Controls.LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SignalDashboard", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();
      Logger.Debug("Logging up and running", typeof(Program));

      ShowForm sf = new ShowForm();
      sf.Text = string.Format("Signal Dashboard - {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
      sf.Create(new DashboardMain());
      Application.Run(sf);

      //Application.EnableVisualStyles();
      //Application.SetCompatibleTextRenderingDefault(false);
      //Application.Run(new Form1());
    }
Пример #9
0
        static void Main()
        {            
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

            Logger.SetLog4NetGlobalContextProperty("LogFileDir",
              string.Format("{0}\\BSServiceClient", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
            Logger.Configure();

            Logger.Debug("Logging up and running", typeof(Program));



            if (!SymmetryEnvironment.IsInSymmetryDomain)
            {
                DialogResult result;

                using (var loginForm = new SI.Controls.LoginForm())
                    result = loginForm.DisplayInShowFormDialog("BSA Login please", null);

                if (result != DialogResult.OK)
                    return;
            }

            if (!Permissioning.UserIsPermissioned(SymmetryEnvironment.UserName))
                return;

            ShowForm sf = new ShowForm
            {
                Text =
                  string.Format("BSServiceClient - {0}",
                    System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
            };

            sf.Create(new BSServiceClientView());



            Application.Run(sf);
        }
Пример #10
0
    public static void Main()
    {
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      SI.Controls.LookFeel.SetupNoirModerneLookFeel();
      setupNMath();
      SI.Controls.ShowForm.DefaultIcon = Properties.Resources.keyIcon;
      setupLogging();


      ShowForm sf = new ShowForm
      {
        Text =
          string.Format("{0} - {1}", Application.ProductName,
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
        Icon = SI.TradeAnalyzer.Properties.Resources.keyIcon
      };
      sf.Create(new Strategy.RatesSpreads.Display.MainControl());

      Application.Run(sf);
    }
Пример #11
0
    protected override void innerLaunch()
    {
      LookFeel.SetupNoirModerneLookFeel();
      ShowForm.DefaultIcon = DashboardResources.Dashboard_01;

      setupNMath();

      var sf = new ShowForm
      {
        Text =
          string.Format("SI.Dashboard - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);
    }
Пример #12
0
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SI.RollMonitor.LN", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();
      Logger.Debug("Logging up and running", typeof(Program));

      if (!SymmetryEnvironment.IsInSymmetryDomain)
      {
        DialogResult result;

        using (var loginForm = new SI.Controls.LoginForm())
          result = loginForm.DisplayInShowFormDialog("RollMonitor Login please", null);

        if (result != DialogResult.OK)
          return;
      }

      ShowForm.DefaultIcon = RollMonitorResources.Designcontest_Vintage_Paint_Roll;

      var sf = new ShowForm
      {
        Text =
          string.Format("SI.RollMonitor - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);

    }
Пример #13
0
    public static void Main()
    {
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      SI.Controls.LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileName", "SI.SeasonalityTool");
      Logger.Configure();
      Logger.SetLog4NetGlobalContextProperty("LogFileDir",
  string.Format("{0}\\Seasonality", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();

      Logger.Debug("Logging up and running", typeof(Program));

      var nMathPath = LocationFinder.GetLocation() == LocationFinder.Location.LN
              ? @"\\symnasuk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative"
              : @"\\symnashk\sd.symmetryinvestments.com$\SS\TradeAnalyzerClient\NMathNative";
      Logger.InfoFormat(typeof(Program), "NMathNativeLocation set to: {0}", nMathPath);
      NMathConfiguration.NativeLocation = nMathPath;

      if (!Singleton<PermissioningAssets>.Instance.HasAsset(AppPermissioningConstants.ApplicationRun))
      {
        Logger.Error(
          string.Format("User is not permissioned for application.  Needs asset: '{0}'",
            AppPermissioningConstants.ApplicationRun), typeof(Program));
        Logger.FlushBuffers();
        return;
      }

      ShowForm.DefaultIcon = SI.Controls.Util.BmpToIcon(Properties.Resources.seasons);

      ShowForm sf = new ShowForm
      {
        Text =
           string.Format("Seasonality Analysis - {0}",
              (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed ?
            ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString()
            : System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString())),
        Icon = SI.Controls.Util.BmpToIcon(Properties.Resources.seasons)
      };

      var c = new SI.Strategy.SeasonalityAnalysis.SeasonalityControl();
      Insomniac.GUI_CONTROL = sf;

      //{
      //  var cc = new SI.Strategy.SeasonalityAnalysis.BloombergSeriesDataAroundEventControl();
      //  c.AddInstrumentSelectionControl("Bloomberg series", cc);
      //}

      {
          var cc = new SI.Strategy.SeasonalityAnalysis.TSCombineInputControl();
          c.AddInstrumentSelectionControl("Derived Series", cc);
      }

      {
        var cc = new SI.Strategy.SeasonalityAnalysis.BloombergSeriesDataAroundEventControl2();
        c.AddInstrumentSelectionControl("Bloomberg series", cc);
        cc.Create();
      }


      {
        var cc = new SI.Strategy.SeasonalityAnalysis.IntradayFutureGroupEventDataControl();
        c.AddInstrumentSelectionControl("Intraday futures", cc);
      }

      if (Singleton<PermissioningAssets>.Instance.HasAsset(AppPermissioningConstants.CT_Functionality))
      {
        var cc = new SI.Strategy.CTDs.Display.CTSeasonalityComponentDropdown();
        c.AddInstrumentSelectionControl("CT", cc);
      }

      {
        var cc = new SI.Strategy.CMTs.Display.SeasonalityPlugin();
        c.AddInstrumentSelectionControl("CMTs", cc);
      }

      {
        if (SI.Strategy.SeasonalityAnalysis.CIXCustomListEventDataControl.CanCreate())
        {
          var cc = new SI.Strategy.SeasonalityAnalysis.CIXCustomListEventDataControl();
          c.AddInstrumentSelectionControl("Custom CIX list", cc);
        }
      }

      {
        var cc = new SI.Strategy.SeasonalityAnalysis.MultiProductParser.SeasonalityPlugin2();
        cc.Create();
        c.AddInstrumentSelectionControl("Daily series", cc);
      }

      {          
          var cc = new SI.Strategy.SeasonalityAnalysis.CustomBasketControl();                    
          c.AddInstrumentSelectionControl("Custom Basket", cc);
      }

      {
          var cc = new SI.Strategy.SeasonalityAnalysis.CustomBasketLoadControl();
          c.AddInstrumentSelectionControl("Custom Basket Loader", cc);
      }

      {
          var cc = new SI.Strategy.SeasonalityAnalysis.CustomSeriesInputControl();
          c.AddInstrumentSelectionControl("Custom Series", cc);
      }

        



      sf.Create(c);

      Application.Run(sf);
    }
      protected override void OnClick(EventArgs e)
      {
        BindingList<WtsSeriesAnalyzer.WtRestriction> list = new BindingList<WtsSeriesAnalyzer.WtRestriction>();
        Array.ForEach(m_analyzer.SourceWts.ColumnHeadings, delegate(string name_) { list.Add(new WtsSeriesAnalyzer.WtRestriction(name_)); });

        ShowForm sf = new ShowForm();
        ApplyWeightRestrictionsControl con = new ApplyWeightRestrictionsControl(list);
        sf.Create(con);

        DialogResult result = DialogResult.Cancel;
        try
        {
          result = sf.ShowDialog();
        }
        catch
        {
          result = DialogResult.Cancel;
        }

        if (result == DialogResult.Cancel)
          return;

        ConstructGen<double> processWeights = m_analyzer.WhatIfTradingRestrictions(list.ToArray());

        var res = SI.Data.ReturnsFromFXWeights.DoIt_DailyWeights(processWeights);

        GetCov covDel = date_ => Singleton<CovarianceSource>.Instance.GetCovarianceForDateElesePrevious(date_);

        WtsSeriesAnalyzer w = new WtsSeriesAnalyzer(
          name_: string.Format("{0}_restricted",m_analyzer.Name),
          wts_: processWeights,
          dailyReturns_: res.CombinedPnl,
          covDelegate_: covDel
        );

        WtsSeriesAnalyzer original = new WtsSeriesAnalyzer(
          m_analyzer.Name,
          m_analyzer.SourceWts,
          m_analyzer.Performance,
          covDel);

        List<WtsSeriesAnalyzer> ll = new List<WtsSeriesAnalyzer>();
        ll.Add(original);
        ll.Add(w);



        WtsAnalysisCompareControl comparer = new WtsAnalysisCompareControl();
        comparer.Create(ll);
        comparer.DisplayInShowForm(string.Format("{0} before and after restricted weights", m_analyzer.Name));

      }
Пример #15
0
    public static ShowForm ShowDialog(IWin32Window owner_, Control c_, FormBorderStyle borderStyle_, Icon icon, string title_)
    {
      ShowForm sf = new ShowForm {FormBorderStyle = borderStyle_, Text = title_, Icon = icon};

      sf.Create(c_);

      if (icon == null && c_ is IFormIconProvider)
        sf.Icon = ((IFormIconProvider)c_).FormIcon;
      else
        sf.Icon = DefaultIcon;

      sf.ShowDialog(owner_);
      sf.BringToFront();
      return sf;
    }