• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UI的典型用法代码示例。如果您正苦于以下问题:C# UI类的具体用法?C# UI怎么用?C# UI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UI类属于命名空间,在下文中一共展示了UI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Add

 public ActionResult Add(UI.Models.PortalContact contact)
 {
     Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
     string jsoncontact = Newtonsoft.Json.JsonConvert.SerializeObject(contact);
     appclient.CreateContact(Session["companyid"].ToString(), Session["companyid"].ToString(), Guid.NewGuid().ToString().Replace("-",""), contact.designation, contact.title, contact.firstname, contact.lastname, contact.emailaddress, contact.officephone, contact.secondaryemail, contact.mobilephone, jsoncontact, contact.objecttype,"", Session["companyid"].ToString());
     return RedirectToAction("index");
 }
开发者ID:vatsavaideepthi,项目名称:Recruitmetrix,代码行数:7,代码来源:ContactsController.cs


示例2: Render

        public virtual void Render(System.IO.TextWriter writer, UI.UIControlState state, params HtmlAttribute[] attributes)
        {
            if (_Label == null)
                _Label = new HtmlSimple("label", state.Label, new HtmlAttribute("for", state.Name));

            _Label.Write(writer);

            if (_Input == null)
                _Input = CreateInput(state);

            for (int i = 0; i < attributes.Length; i++)
                _Input.Attributes[attributes[i].Name] = attributes[i].Value;

            this._Input.Write(writer);

            if (!string.IsNullOrEmpty(state.ErrorMessage))
                new HtmlSimple("span", state.ErrorMessage, new HtmlAttribute("class", "error")).Write(writer);
            else
            {
                if (!string.IsNullOrEmpty(state.Hint))
                {
                    if (_Hint == null)
                        _Hint = new HtmlSimple("span", state.Hint, new HtmlAttribute("class", "hint"));

                    _Hint.Write(writer);
                }
            }
        }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:28,代码来源:HtmlControl.cs


示例3: Add

 public ActionResult Add(UI.Models.Job jobdata)
 {
     UI.Models.Job job = new Models.Job();
     jobdata.PayRate = jobdata.PayRate + "-" + jobdata.payratemax;
     job.InsertJobDetials(jobdata);
     return RedirectToAction("index", "jobs", null);
 }
开发者ID:vatsavaideepthi,项目名称:Recruitmetrix,代码行数:7,代码来源:JobsController.cs


示例4: Main

 static void Main()
 {
     var ui = new UI(new RealConsoleAdapter());
     while (ui.Process())
     {
     }
 }
开发者ID:peitor,项目名称:CodeKatas,代码行数:7,代码来源:Program.cs


示例5: TiawpsReader

 public TiawpsReader(UI.DelegateManager delegatemanager, string filename)
 {
     this.delegatemanager = delegatemanager;
     readrguid = Guid.NewGuid();
     this.fileName = filename;
     name = System.IO.Path.GetFileNameWithoutExtension(fileName);
 }
开发者ID:devmaximus,项目名称:MaximusParserX,代码行数:7,代码来源:TiawpsReader.cs


示例6: consultant

        public ActionResult consultant(UI.Models.portaluser recruiterdata)
        {
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
            appclient.Addconsultant(recruiterdata.usermail, recruiterdata.userpassword, recruiterdata.usertitle, Session["usertoken"].ToString());

            return RedirectToAction("index");
        }
开发者ID:vatsavaideepthi,项目名称:Recruitmetrix,代码行数:7,代码来源:UsersController.cs


示例7: Start

    void Start()
    {
        UITextInfo backTextInfo = new UITextInfo();
        backTextInfo.SetFont(fontBack).SetFontSize(24).SetColor(new Color(1f, 1f, 1f)).SetTextAlignment(UIAnchorLocation.LEFT_TOP);

        UITextInfo backTextLargerInfo = new UITextInfo();
        backTextLargerInfo.SetFont(fontBack).SetFontSize(28).SetColor(new Color(1f, 1f, 1f)).SetTextAlignment(UIAnchorLocation.LEFT_TOP);

        UIRelativeLayout rootLayout = new UIRelativeLayout("rootLayout", 0f, 0f, 1f, 1f, null, UIAnchorLocation.LEFT_BOT);

        UIStringLabel backLabelSmall = new UIStringLabel(0.01f, 0.99f, 0.2f, 0.1f, null, UILayoutType.RELATIVE_LAYOUT, UIAnchorLocation.LEFT_TOP, backTextInfo, "Back");
        UIStringLabel backLabelLarge = new UIStringLabel(0.01f, 0.99f, 0.2f, 0.1f, null, UILayoutType.RELATIVE_LAYOUT, UIAnchorLocation.LEFT_TOP, backTextLargerInfo, "Back");
        UIStaticButton backButton = new UIStaticButton(0.01f, 0.99f, 0.1f, 0.08f, null, UILayoutType.RELATIVE_LAYOUT, UIAnchorLocation.LEFT_TOP, new MenuButtonListener(hover, dehover, "MainMenu"));

        backButton.SetUIComponentIdle(backLabelSmall).SetUIComponentHighlighted(backLabelLarge);

        UITextInfo mainTextInfo = new UITextInfo();
        mainTextInfo.SetFont(fontMain).SetFontSize(48).SetColor(new Color(1f, 1f, 1f)).SetTextAlignment(UIAnchorLocation.LEFT_TOP);

        UIStringLabel mainTextLabel = new UIStringLabel(0.15f, 0.8f, 0.9f, 0.5f, null, UILayoutType.RELATIVE_LAYOUT, UIAnchorLocation.LEFT_TOP, mainTextInfo, mainText);

        rootLayout.AddUIComponent(backButton)
            .AddUIComponent(mainTextLabel);

        m_panel = new UI(rootLayout);
        m_panel.SetStartMenu(1);

        screenWidth = Screen.width;
        screenHeight = Screen.height;
    }
开发者ID:JELGT2011,项目名称:A_Spire_to_Defend,代码行数:30,代码来源:JustTextMenuRunner.cs


示例8: About

        public About(UI ui)
            : base(ui)
        {
            this.name = "About";

            CreatePage();
        }
开发者ID:WhyN92,项目名称:WhyNsStreamWatcher,代码行数:7,代码来源:About.cs


示例9: Dama

 public Dama()
 {
     InitializeComponent();
     ui = new UI();
     this.Width = 650;
     this.Height = 540;
     igra = false;
     polje = new int[10, 10];
     poteze1 = new List<Poteza>();
     poteze2 = new List<Poteza>();
     poteze = new List<Poteza>();
     narejene_poteze = new List<Poteza>();
     poteza = true;
     stran = true;
     prvi_klik = false;
     stevilka_poteze = -1;
     slika = new Bitmap(530, 530);
     pictureBox1.Width = 510;
     pictureBox1.Height = 510;
     besedilo.Top = 5;
     besedilo.Left = 510;
     besedilo.Width = 180;
     besedilo.Height = 500;
     besedilo.ScrollBars = ScrollBars.Vertical;
     besedilo.Text += "Pozdravljeni! \r\n";
     pictureBox1.Image = slika;
     potrebno = true;
     ctrl = z = false;
     menu();
 }
开发者ID:gabrjan,项目名称:Diplomska,代码行数:30,代码来源:Dama.cs


示例10: Default

	void Default(int active) {
		currentUI = Default;
		curActive = active;
		GUI.depth = 0;
		CreatePanel ();
		CreateNavButton ("Research",Research);
		CreateNavButton ("Components",Components);

        //Debug stuff

		/*if (CreateButton ("Spawn Ship")) {
			shipbuilder.SpawnShip();
		}

		if (CreateButton ("Destroy Ship")) {
			shipbuilder.DespawnShip();
		}
        */
		if (CreateButton ("Save")) 
			shipbuilder.Save ();
        /*

		if (CreateButton ("Load"))
			shipbuilder.Load (0);*/
	}
开发者ID:LatexBotox,项目名称:SPACE,代码行数:25,代码来源:HangarUI.cs


示例11: CreateInput

        protected override HtmlNode CreateInput(UI.UIControlState state)
        {
            HtmlComposite ul = new HtmlComposite("ul");

            System.Collections.IEnumerable items =
                state.Value is string ?
                ((string)state.Value).Split(',') :
                (System.Collections.IEnumerable)state.Value;

            foreach (KeyValuePair<object, object> item in state.Options)
            {
                HtmlComposite li = new HtmlComposite("li");
                ul.Children.AddLast(li);

                string id = state.Name + "_" + item.Key;

                li.Children.AddLast(new HtmlSimple("label", item.Value, new HtmlAttribute("for", id)));

                HtmlStandalone checkbox = new HtmlStandalone("input",
                    new HtmlAttribute("type", "checkbox"),
                    new HtmlAttribute("id", id),
                    new HtmlAttribute("name", state.Name),
                    new HtmlAttribute("value", item.Key));

                if (IsChecked(items, item.Key))
                    checkbox.Attributes.AddLast("checked", "checked");

                li.Children.AddLast(checkbox);
            }

            return ul;
        }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:32,代码来源:BootstrapCheckboxGroup.cs


示例12: CreateInput

        protected override HtmlNode CreateInput(UI.UIControlState state)
        {
            HtmlComposite ul = new HtmlComposite("ul", new HtmlAttribute("class", "unstyled"));

            foreach (KeyValuePair<object, object> item in state.Options)
            {
                HtmlComposite li = new HtmlComposite("li");
                ul.Children.AddLast(li);
                
                
                string id = state.Name + "_" + item.Key;
                HtmlComposite label = new HtmlComposite("label", new HtmlAttribute("class", "checkbox"));
                li.Children.AddLast(label);

                HtmlStandalone checkbox = new HtmlStandalone("input",
                    new HtmlAttribute("type", "radio"),
                    new HtmlAttribute("id", id),
                    new HtmlAttribute("name", state.Name),
                    new HtmlAttribute("value", item.Key));

                if (state.Value.Equals(item.Key))
                    checkbox.Attributes.AddLast("checked", "checked");


                label.Children.AddLast(checkbox);
                label.Children.AddLast(new HtmlText(" " + item.Value));

            }

            return ul;
        }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:31,代码来源:BootstrapRadioGroup.cs


示例13: Main

        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // build
            var es = new EventStore("eventstore.db");
            var ui = new UI();

            var sb = new Spielbrett(es.History);

            var sp = new Spiel(es);
            var schiri = new Schiedsrichter(es);
            var map = new Mapper(sb);
            var app = new App(sp, schiri, map);

            // bind
            es.OnAppended += sb.Update;

            app.Spielstand_aktualisiert += ui.Spielstand_anzeigen;

            ui.Neues_Spiel_gewünscht += app.Neues_Spiel;
            ui.Spielstein_gesetzt += app.Zug_ausführen;

            // run
            app.Starten();

            Application.Run(ui);
        }
开发者ID:ralfw,项目名称:DWX14Workshop,代码行数:29,代码来源:Program.cs


示例14: Render

        public virtual void Render(System.IO.TextWriter writer, UI.UIControlState state, params HtmlAttribute[] attributes)
        {


            writer.Write("<div class=\"");
            if (state.Validated)
            {
                if (string.IsNullOrEmpty(state.ErrorMessage))
                {
                    writer.Write("form-group has-success");
                }
                else
                {
                    writer.Write("form-group has-error");
                }
            }
            else
            {
                writer.Write("form-group");
            }

            writer.WriteLine("\">");

            RenderLabel(writer, state);
            RenderInput(writer, state, attributes);
            RenderHintOrError(writer, state);


            writer.WriteLine("</div>");

        }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:31,代码来源:Bootstrap3Control.cs


示例15: DisplayMenu

	void DisplayMenu ()
	{
		if (Social.localUser == null || !Social.localUser.authenticated) {
			if (GUILayout.Button("Login/Register")) {
				LumosSocialGUI.ShowWindow(LumosGUIWindow.Login);
			}
		} else {
			if (GUILayout.Button("Achievements")) {
				LumosSocialGUI.ShowWindow(LumosGUIWindow.Achievements);
			}
			
			if (GUILayout.Button("Leaderboards")) {
				LumosSocialGUI.ShowWindow(LumosGUIWindow.Leaderboards);
			}
			
			if (GUILayout.Button("Profile")) {
				LumosSocialGUI.ShowWindow(LumosGUIWindow.Profile);
			}
			
			if (GUILayout.Button("Settings")) {
				LumosSocialGUI.ShowWindow(LumosGUIWindow.Settings);
			}
			
			if (GUILayout.Button("Close")) {
				currentUI = UI.None;
			}
		}
	}
开发者ID:GDxU,项目名称:incomplete-richman,代码行数:28,代码来源:LumosSocialDemoBasicGUI.cs


示例16: Settings

        public Settings(UI ui)
            : base(ui)
        {
            this.name = "Settings";

            CreatePage();
        }
开发者ID:WhyN92,项目名称:WhyNsStreamWatcher,代码行数:7,代码来源:Settings.cs


示例17: Run

        public void Run()
        {
            var app = new MockApplication();
            var sut = new UI(app);

            Application.Run(sut);
        }
开发者ID:ralfw,项目名称:TDDaiymiByExample,代码行数:7,代码来源:test_UI.cs


示例18: ReviewClientOrderPage

        public ReviewClientOrderPage(YellowstonePathology.Business.Rules.Surgical.PatientRecentAccessions patientRecentAccessions,
			YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder,
			UI.Navigation.PageNavigator pageNavigator)
        {
            this.m_PatientRecentAccessions = patientRecentAccessions;
            this.m_ClientOrder = clientOrder;
            this.m_PageNavigator = pageNavigator;

            InitializeComponent();

            this.DataContext = this;

            if (this.m_ClientOrder.Accessioned == true)
            {
                this.m_CloseButtonVisibility = System.Windows.Visibility.Collapsed;
                this.m_NextButtonVisibility = System.Windows.Visibility.Visible;
            }
            else
            {
                this.m_CloseButtonVisibility = System.Windows.Visibility.Visible;
                this.m_NextButtonVisibility = System.Windows.Visibility.Collapsed;
            }

            this.Loaded += new RoutedEventHandler(ReviewClientOrderPage_Loaded);
        }
开发者ID:ericramses,项目名称:YPILIS,代码行数:25,代码来源:ReviewClientOrderPage.xaml.cs


示例19: CreateInput

 protected override HtmlNode CreateInput(UI.UIControlState state)
 {
     return new HtmlStandalone("input",
         new HtmlAttribute("type", "hidden"),
         new HtmlAttribute("name", state.Name),
         new HtmlAttribute("id", state.Name),
         new HtmlAttribute("value", state.Value));
 }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:8,代码来源:BootstrapHidden.cs


示例20: AddPropertiesToSWPage

 /// <summary>
 /// Adds the properties to the solidworks page
 /// </summary>
 /// <param name="page">The page to be added to</param>
 /// <param name="id">The starting Id for the controls. Will be updated to the next avalible id</param>
 /// <param name="mark">The starting mark for the selection boxes.Will be updated to the next avalible mark</param>
 public override void AddPropertiesToSWPage(UI.JointPMPage page, ref int id, ref int mark)
 {
     modelDoc.ClearSelection2(true);
     Axes[0].AddAxisToPage(ref id, ref mark, page, ref AxisSelBoxIDs[0]);
     Axes[1].AddAxisToPage(ref id, ref mark, page, ref AxisSelBoxIDs[1]);
     if (!Axes[0].UseCustomMovementLimits && !((RotationalJointAxis)Axes[0]).IsContinuous)
         Axes[0].AddLimitsToPage(ref id, ref mark, page);
 }
开发者ID:FRCTeam159,项目名称:MentorRepository,代码行数:14,代码来源:Revolute2Joint.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UIActionEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# UGCUpdateHandle_t类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap