当前位置: 首页>>代码示例>>C#>>正文


C# Constants.ToString方法代码示例

本文整理汇总了C#中Constants.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Constants.ToString方法的具体用法?C# Constants.ToString怎么用?C# Constants.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Constants的用法示例。


在下文中一共展示了Constants.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendServiceReport

        internal static void SendServiceReport(string fromEmailAddress, string fromFriendlyName, string toEmailAddress, string serviceName, string body, Constants.ProcessOutcome lastActionOutcome)
        {
            var subject = string.Format("{0} Service SUCCEEDED (or RECOVERED from failure) ({1})", serviceName, lastActionOutcome.ToString());

            if (lastActionOutcome == Constants.ProcessOutcome.ExpectedFileNotFoundError)
                subject = string.Format("{0} Service WARNING ({1})", serviceName, lastActionOutcome.ToString());
            else if(lastActionOutcome != Constants.ProcessOutcome.Success)
                subject = string.Format("{0} Service FAILED ({1})", serviceName, lastActionOutcome.ToString());

            EmailHelper.SendEmail(fromEmailAddress, fromFriendlyName, toEmailAddress, subject, body);
        }
开发者ID:mahaamaresh,项目名称:Supermarket-Importer-Test,代码行数:11,代码来源:Messaging.cs

示例2: AuctionHouseSearch

        public AuctionHouseSearch(Context context, Constants.Search search)
            : base("AuctionHouseSearch", context)
        {
            this.search_ = search;
            this.args_ = new List<string>();

            this.args_.Add("type");
            this.args_.Add(search.ToString().ToLower());
        }
开发者ID:ddksaku,项目名称:futbot,代码行数:9,代码来源:AuctionHouseSearch.cs

示例3: GetResultText

        public ResultText GetResultText(Constants.ResultTypes type)
        {
            try
            {
                string stype = type.ToString();
                return Entities.ResultTexts.FirstOrDefault(res => res.id == stype);
            }
            catch (Exception exc)
            {

                return new ResultText(){success = false,text = "unknown error"};
            }
        }
开发者ID:surgerer,项目名称:QrTrack,代码行数:13,代码来源:ResultsService.cs

示例4: GetVideoFileNameOnlyName

 public static string GetVideoFileNameOnlyName(Constants.TestTypes testType, int uniqueID)
 {
     return testType.ToString() + "-" + uniqueID.ToString() +
         GetMultimediaExtension(Constants.MultimediaItems.VIDEO);
 }
开发者ID:GNOME,项目名称:chronojump,代码行数:5,代码来源:util.cs

示例5: GetVideoFileName

 //returns absolute path, but in encoder this URL is stored in database as relative to be able to move data between computers
 //see SqliteEncoder.removeURLpath
 public static string GetVideoFileName(int sessionID, Constants.TestTypes testType, int uniqueID)
 {
     return GetVideoSessionDir(sessionID) + Path.DirectorySeparatorChar +
         testType.ToString() + "-" + uniqueID.ToString() +
         GetMultimediaExtension(Constants.MultimediaItems.VIDEO);
 }
开发者ID:GNOME,项目名称:chronojump,代码行数:8,代码来源:util.cs

示例6: Order

        /// <summary>
        /// Constructor for detected contact related order.
        /// </summary>
        /// <param name="TypeOrder">Type</param>
        /// <param name="SecondaryOrder">Secondary</param>
        /// <param name="TertiaryOrder">Tertiary</param>
        /// <param name="Delay">Order delay</param>
        /// <param name="ShipsOrder">Ship target of order</param>
        public Order(Constants.ShipTN.OrderType TypeOrder, int SecondaryOrder, int TertiaryOrder, int Delay, ShipTN ShipsOrder)
        {
            TypeOf = TypeOrder;
            Target = ShipsOrder.ShipsTaskGroup.Contact;
            Secondary = SecondaryOrder;
            Tertiary = TertiaryOrder;
            ShipOrder = ShipsOrder;
            TaskGroup = ShipsOrder.ShipsTaskGroup;
            OrderDelay = Delay;

            OrderTimeRequirement = -1;

            Name = TypeOrder.ToString() + " " + ShipOrder.Name.ToString();
        }
开发者ID:EterniaLogic,项目名称:Pulsar4x,代码行数:22,代码来源:Order.cs

示例7: chronojumpWindowTestsMode

    /*
     * TESTS START
     */
    private void chronojumpWindowTestsMode(Constants.Menuitem_modes m)
    {
        LogB.TestStart("chronojumpWindowTestsMode", m.ToString());

        //disable autodetect
        //configAutodetectPort = Config.AutodetectPortEnum.INACTIVE;

        select_menuitem_mode_toggled(m);

        LogB.TestEnd("chronojumpWindowTestsMode");
    }
开发者ID:GNOME,项目名称:chronojump,代码行数:14,代码来源:guiTests.cs

示例8: select_menuitem_mode_toggled

    private void select_menuitem_mode_toggled(Constants.Menuitem_modes m)
    {
        menuitem_mode_selected_jumps_simple.Visible = false;
        menuitem_mode_selected_jumps_reactive.Visible = false;
        menuitem_mode_selected_runs_simple.Visible = false;
        menuitem_mode_selected_runs_intervallic.Visible = false;
        menuitem_mode_selected_power_gravitatory.Visible = false;
        menuitem_mode_selected_power_inertial.Visible = false;
        menuitem_mode_selected_other.Visible = false;

        LogB.Information("MODE", m.ToString());

        //default for everythong except encoder
        menuitem_encoder_session_overview.Visible = false;
        menuitem_export_encoder_signal.Visible = false;
        menuitem_export_csv.Visible = true;

        hbox_other.Visible = false;
        vbox_last_test_buttons.Sensitive = false;

        if(m == Constants.Menuitem_modes.JUMPSSIMPLE || m == Constants.Menuitem_modes.JUMPSREACTIVE)
        {
            notebook_sup.CurrentPage = 0;
            notebook_capture_analyze.ShowTabs = true;
            if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
            {
                menuitem_mode_selected_jumps_simple.Visible = true;
                notebooks_change(0);
                on_extra_window_jumps_test_changed(new object(), new EventArgs());
                hbox_results_legend.Visible = true;
                notebook_capture_analyze.GetNthPage(2).Show(); //show jumpsProfile on jumps simple
            } else
            {
                menuitem_mode_selected_jumps_reactive.Visible = true;
                notebooks_change(1);
                on_extra_window_jumps_rj_test_changed(new object(), new EventArgs());
                hbox_results_legend.Visible = false;
                notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on jumps reactive
            }
        }
        else if(m == Constants.Menuitem_modes.RUNSSIMPLE || m == Constants.Menuitem_modes.RUNSINTERVALLIC)
        {
            notebook_sup.CurrentPage = 0;
            notebook_capture_analyze.ShowTabs = true;

            if(m == Constants.Menuitem_modes.RUNSSIMPLE)
            {
                menuitem_mode_selected_runs_simple.Visible = true;
                notebooks_change(2);
                on_extra_window_runs_test_changed(new object(), new EventArgs());
                hbox_results_legend.Visible = true;
            }
            else
            {
                menuitem_mode_selected_runs_intervallic.Visible = true;
                notebooks_change(3);
                on_extra_window_runs_interval_test_changed(new object(), new EventArgs());
                hbox_results_legend.Visible = false;
            }
            notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on runs
        }
        else if(m == Constants.Menuitem_modes.POWERGRAVITATORY || m == Constants.Menuitem_modes.POWERINERTIAL)
        {
            menuitem_encoder_session_overview.Visible = true;
            menuitem_export_encoder_signal.Visible = true;
            menuitem_export_csv.Visible = false;

            //on OSX R is not installed by default. Check if it's installed. Needed for encoder
            if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX &&
                    ! Util.FileExists(Constants.ROSX) )
            {
                new DialogMessage(Constants.MessageTypes.WARNING,
                        Catalog.GetString("Sorry, R software is not installed.") +
                        "\n" + Catalog.GetString("Please, install it from here:") +
                        "\n\nhttp://cran.cnr.berkeley.edu/bin/macosx/R-latest.pkg");
                return;
            }

            notebook_sup.CurrentPage = 1;

            /*
             * If there's a signal on gravitatory and we move to inertial,
             * interface has to change to YESPERSON (meaning no_signal).
             * But, if there's no person shoud continue on NOPERSON
             */
            if(selectRowTreeView_persons(treeview_persons, treeview_persons_store, 0))
                encoderButtonsSensitive(encoderSensEnum.YESPERSON);

            blankEncoderInterface();

            bool changed = false;
            if(m == Constants.Menuitem_modes.POWERGRAVITATORY) {
                menuitem_mode_selected_power_gravitatory.Visible = true;

                //change encoderConfigurationCurrent if needed
                if(encoderConfigurationCurrent.has_inertia) {
                    encoderConfigurationCurrent = new EncoderConfiguration(); //LINEAR, not INERTIAL
                    changed = true;
                }

//.........这里部分代码省略.........
开发者ID:GNOME,项目名称:chronojump,代码行数:101,代码来源:chronojump.cs


注:本文中的Constants.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。