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

C# View类代码示例

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

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



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

示例1: MemberController

 /// <summary>
 /// Constructor, creates new instances of necessary objects
 /// save them to fields 
 /// </summary>
 /// <param name="mainMenu"></param>
 /// <param name="editUpdateMenu"></param>
 public MemberController(View.MainMenuView mainMenu, EditUpdateMenu editUpdateMenu)
 {
     _mainMenu = mainMenu;
     _editUpdateMenu = editUpdateMenu;
     _memberDAL = new MemberDAL(directorieStrs.MemberListPath);
     _members = new List<Member>();
 }
开发者ID:fumg,项目名称:1DV607,代码行数:13,代码来源:MemberController.cs


示例2: Printer

 public Printer(View.UserInput input)
     : this()
 {
     // Always a dilemma how much validation to do and where
     // For now expecting View to validate user input
     // TODO: Clear definition of protocol for each of M, V and C
     //       so it is clear what validation to do and where.
     if (input.Options["feedType"] != null)
     {
         feedType = input.Options["feedType"];
     }
     if (input.Options["feedIdentifier"] != null)
     {
         feedIdentifier = input.Options["feedIdentifier"];
     }
     if (input.Options["/with"] != null) {
         conditions["searchTerm"] = input.Options["/with"];
         conditions["excludeSearchTerm"] = false;
     }
     else if (input.Options["/without"] != null) {
         conditions["searchTerm"] = input.Options["/with"];
         conditions["excludeSearchTerm"] = true;
     }
     if (input.Options["/latest"] != null) {
         conditions["tailSize"] = input.Options["/latest"];
     }
 }
开发者ID:yatinshelke,项目名称:Code-Challenge-C,代码行数:27,代码来源:Printer.cs


示例3: ToggleViewOnSelection

 void ToggleViewOnSelection(View myView)
 {
     if (selectedView != myView) { selectedView = myView; }
     if (lastView != null) { Managers.Views.ToggleView(lastView, false); }
     Managers.Views.ToggleView(selectedView, true);
     lastView = selectedView;
 }
开发者ID:TheWanderingTree,项目名称:temple,代码行数:7,代码来源:ViewEditor.cs


示例4: Export

        public void Export(JekyllExporter exporter, View view, StreamWriter writer)
        {
            var guid = Guid.NewGuid();

            writer.WriteLine($"<div id='{guid}' class='cy'></div>");
            writer.WriteLine(@"
            <script>
            var cy = cytoscape({
            ");
            writer.WriteLine($"container: document.getElementById('{guid}'),");
            writer.WriteLine("elements: [");

            var nodes = view.Elements.Select(e => "{ data: { id: '" + e.Name + "', width: '"+ e.Name.Length * 10 +"px' } }");
            var edges = view.Relationships.Select(r => "{ data: { id: '" + r.Source.Name + "_to_" + r.Target.Name + "', source: '"+ r.Source.Name +"', target: '"+r.Target.Name+"' } }");

            writer.WriteLine(string.Join(",", nodes.Union(edges)));

            writer.WriteLine(@"
              ],

              style: cyto_" + view.ViewType.ToString().ToLowerInvariant() + @",

              layout: {
            name: 'cola',
            fit: true,
            nodeSpacing: 5,
            edgeLengthVal: 45
              }

            });
            </script>");
        }
开发者ID:AgileArchitect,项目名称:AgileViews,代码行数:32,代码来源:CytoScapeExporter.cs


示例5: DataTablePropertiesDialog

 /// <summary>
 /// Default constructor for the class
 /// </summary>
 public DataTablePropertiesDialog(MainForm frm, Project currentProject, View view)
     : base(frm)
 {
     InitializeComponent();
     project = currentProject;
     currentView = view;
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:10,代码来源:DataTablePropertiesDialog.cs


示例6: frmMain

        public frmMain()
        {
            InitializeComponent();

            viewCurent = View.Main;

            clhData.Width = -1;
            clhDetalii.Width = 350;
            clhPerioada.Width =-1;
            clhSuma.Width = -2;

            pnlAdaugaNotita.Hide();
            pnlNotite.Hide();
            pnlGrafic.Hide();
            pnlAdaugaEveniment.Hide();
            pnlMain.Show();

            evenimente = EvenimentReader.citesteEvenimente("evenimente.xml");
            maxIdEveniment = getMaxIdEveniment();

            notite = NotitaReader.citesteNotite("notite.xml");
            maxIdNotita = getMaxIdNotita();

            amModificat = false;
            modificare = false;
            totalEvenimente = true;
            amAfisatEvenimentePeriodice = false;

            afiseazaEvenimente();

            tmrEvenimente.Enabled = true;
        }
开发者ID:razvangog,项目名称:Gestiune_Cheltuieli,代码行数:32,代码来源:frmMain.cs


示例7: UpdateEffect

 protected override void UpdateEffect(GameTime gameTime, View view)
 {
     if (Acceleration != Vector2.Zero) {
         Velocity = Vector2.Add (Velocity, Acceleration);
     }
     view.PositionAdd(Velocity);
 }
开发者ID:fordream,项目名称:Sunfish,代码行数:7,代码来源:Motion.cs


示例8: Init

        public void Init()
        {
            var spawns = Entity.GetByClass<SpawnPoint>();
            if(spawns.Count() > 0)
            {
                Position = spawns.First().Position;
                Rotation = spawns.First().Rotation;
            }

            View = View.Get(Id);

            View.Position = Position;
            View.Rotation = Rotation;
            View.FieldOfView = Math.DegreesToRadians(60);

            ReceiveUpdates = true;

            // Defined in Libs/Config/defaultprofile.xml
            Input.RegisterAction("zoom_in", OnActionZoomIn);
            Input.RegisterAction("zoom_out", OnActionZoomOut);

            Input.MouseEvents += ProcessMouseEvents;

            MaxZoomLevel = 5;
            MaxDistanceFromTarget = 100;

            CurrentZoomLevel = MaxZoomLevel;

            // The CVar attribute isn't functional at the moment, so we use this workaround.
            CVar.RegisterInt("g_camMaxZoomLevel", ref MaxZoomLevel);
            CVar.RegisterFloat("g_camMaxDistanceFromTarget", ref MaxDistanceFromTarget);

            TargetEntity = Launcher.Instance;
        }
开发者ID:jjiezheng,项目名称:AngryBoids,代码行数:34,代码来源:PlayerCamera.cs


示例9: GenerateHtml

        protected override string GenerateHtml(View view, string className, string clasError)
        {
            string s = "<input type=\"password\" value=\"" + HttpUtility.HtmlAttributeEncode(Value) + "\"";

            s = AddIdAttribute(s);
            s = AddNameAttribute(s);
            s = AddClassAttribute(s, className, clasError);
            s = AddEnabledAttribute(s);
            s = AddOnChangeAttribute(s);

            if (MaxLength != Int32.MaxValue)
                s += " maxlength=\"" + MaxLength + "\"";

            if (Size != 0)
                s += " size=\"" + Size + "\"";

            if (!string.IsNullOrEmpty(OnKeyDown))
                s += " onkeydown=\"" + OnKeyDown + "\"";

            if (!string.IsNullOrEmpty(OnKeyUp))
                s += " onkeyup=\"" + OnKeyUp + "\"";

            if (!string.IsNullOrEmpty(OnKeyPress))
                s += " onkeypress=\"" + OnKeyPress + "\"";

            s += " autocomplete=\"off\"";

            return s + " />";
        }
开发者ID:TheMouster,项目名称:mvc,代码行数:29,代码来源:PasswordBoxControl.cs


示例10: getView

			public override View getView(int position, View convertView, ViewGroup parent)
			{
				LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
				View rowView = inflater.inflate(mResource, parent, false);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.opentok.android.Subscriber subscriber = mSubscribers.get(position);
				Subscriber subscriber = outerInstance.mSubscribers[position];

				// Set name
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.TextView name = (android.widget.TextView) rowView.findViewById(R.id.subscribername);
				TextView name = (TextView) rowView.findViewById(R.id.subscribername);
				name.Text = subscriber.Stream.Name;

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.widget.ImageView picture = (android.widget.ImageView) rowView.findViewById(R.id.subscriberpicture);
				ImageView picture = (ImageView) rowView.findViewById(R.id.subscriberpicture);

				// Initialize meter view
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.opentok.android.demo.ui.MeterView meterView = (com.opentok.android.demo.ui.MeterView) rowView.findViewById(R.id.volume);
				MeterView meterView = (MeterView) rowView.findViewById(R.id.volume);
				meterView.setIcons(BitmapFactory.decodeResource(Resources, R.drawable.unmute_sub), BitmapFactory.decodeResource(Resources, R.drawable.mute_sub));
				subscriber.AudioLevelListener = new AudioLevelListenerAnonymousInnerClassHelper(this, subscriber, meterView);

				meterView.setOnClickListener(new OnClickListenerAnonymousInnerClassHelper(this, subscriber, name, picture));

				return rowView;
			}
开发者ID:moljac,项目名称:Samples.Data.Porting,代码行数:30,代码来源:VoiceOnlyActivity.cs


示例11: Show

 public void Show(View view, object param = null)
 {
     Messenger.Default.Send(
         param == null
             ? new Uri(_viewToUri[view], UriKind.Relative)
             : new Uri(String.Format(_viewToUri[view], param), UriKind.Relative), "NavigationRequest");
 }
开发者ID:Maskl,项目名称:Flags,代码行数:7,代码来源:ViewManager.cs


示例12: GetValidRules

 public virtual IEnumerable<ILogicRuleObject> GetValidRules(View view,  ExecutionContext executionContext) {
     if (view!=null) {
         var tuple = new Tuple<ITypeInfo, ExecutionContext>(view.ObjectTypeInfo, executionContext);
         return LogicRuleManager.Instance[tuple].Where(rule => IsValidRule(rule, view)).OrderBy(rule => rule.Index);
     }
     return Enumerable.Empty<ILogicRuleObject>();
 }
开发者ID:noxe,项目名称:eXpand,代码行数:7,代码来源:LogicRuleEvaluator.cs


示例13: PortRegistered

        public override void PortRegistered(View.VPort port)
        {
            logger.Log("{0} got registeration notification for {1}", ToString(), port.ToString());

            lock (this)
            {
                if (Role.ContainsRole(port, RoleFitbitUltra.RoleName))
                {
                    fitbitPort = port;
                    logger.Log("{0} added fitbitUltra port {1}", this.ToString(), port.ToString());

                    if (logWindow != null)
                        logWindow.Invoke(new Action(delegate() { logWindow.ConsoleLog("added port " + port.ToString()); }));
                }

                if (Role.ContainsRole(port, RoleSensor.RoleName))
                {
                    sensorPort = port;
                    logger.Log("{0} added switchbinary port {0}", this.ToString(), port.ToString());

                    if (logWindow != null)
                        logWindow.Invoke(new Action(delegate() { logWindow.ConsoleLog("added port " + port.ToString()); }));
                }
            }
        }
开发者ID:purdue-cs-groups,项目名称:cs490-007-project01,代码行数:25,代码来源:AppFitbitUltraSecurity.cs


示例14: onListItemClick

		public override void onListItemClick(ListView l, View v, int position, long id)
		{
			string path = mCurrentPath + mArrayList[position];
			File file = new File(path);

			if (file.Directory)
			{
				if (path.IndexOf(PARENT_DIRECTORY_PATH, StringComparison.Ordinal) > 0)
				{
					mCurrentPath = file.ParentFile.Parent + DIRECTORY_DELIMITER;
				}
				else
				{
					mCurrentPath = path;
				}
				createDirectoryList(new File(mCurrentPath));

				mTextView.Text = mCurrentPath;
				mAdapter.notifyDataSetChanged();
			}
			else
			{
				if (!path.EndsWith(".fls", StringComparison.Ordinal) && !path.EndsWith(".bin", StringComparison.Ordinal))
				{
					Toast.makeText(this, "Must choose .fls or .bin file", Toast.LENGTH_SHORT).show();
				}
				else
				{
					Intent data = new Intent();
					data.putExtra(MainActivity.FIRMWARE_FILE_NAME, path);
					setResult(MainActivity.RESULT_CODE_SELECT_FIRMWARE, data);
					finish();
				}
			}
		}
开发者ID:moljac,项目名称:Samples.Data.Porting,代码行数:35,代码来源:FileExplorerActivity.cs


示例15: OnClick

 public void OnClick(View v)
 {
     var offset = _scrollView.ParallaxOffset;
     switch (v.Id)
     {
         case Resource.Id.minus:
             offset = _scrollView.ParallaxOffset;
             offset = offset - 0.05f;
             _scrollView.ParallaxOffset = offset;
             offset = _scrollView.ParallaxOffset;
             _factorText.Text = string.Format("{0}", offset);
             break;
         case Resource.Id.plus:
             offset = _scrollView.ParallaxOffset;
             offset = offset + 0.05f;
             _scrollView.ParallaxOffset = offset;
             offset = _scrollView.ParallaxOffset;
             _factorText.Text = string.Format("{0}", offset);
             break;
     }
     if (offset * 100 <= 10)
     {
         _minus.Enabled = false;
         _plus.Enabled = true;
     }
     else
     {
         _minus.Enabled = true;
         _plus.Enabled = true;
     }
 }
开发者ID:jorik041,项目名称:ParallaxScrollView,代码行数:31,代码来源:Activity1.cs


示例16: Export

        public void Export(View view)
        {
            var path = _configuration.Path(view);

            Directory.CreateDirectory(Path.GetDirectoryName(path));

            using (var stream = new FileStream(path, FileMode.Create))
            using (var writer = new StreamWriter(stream))
            {
                writer.WriteLine("---");
                writer.WriteLine("layout: page");
                writer.WriteLine($"title: {view.Name}");
                writer.WriteLine($"permalink: {_configuration.Permalink(view)}");
                writer.WriteLine($"type: {view.ViewType.ToString().ToLowerInvariant()}");
                writer.WriteLine($"tags: [view, {view.Name}]");
                writer.WriteLine("---");
                // export the image

                writer
                    .AppendViewBlock(this, view, new XGraphVizExporter.XGraphVizExporter())
                    .EmptyLine()
                    .AppendViewBlock(this, view, new ElementListViewExporter());

                writer.Flush();
            }
        }
开发者ID:AgileArchitect,项目名称:AgileViews,代码行数:26,代码来源:JekyllExporter.cs


示例17: btnUserButton_Click

    protected void btnUserButton_Click(object sender, EventArgs e)
    {
        try
        {
            int numOfViews = Convert.ToInt32(txtUserTextbox.Text); // Get number of views from textbox
            views.Clear();
            for (int i = 0; i < numOfViews; i++)
            {
                // Create view
                Label lblOne = new Label();
                lblOne.Text = "View " + (i+1).ToString();
                View myViewOne = new View();
                myViewOne.Controls.Add(lblOne);
                // Build view list
                views.Add(myViewOne);
                mvUserMultiview.Views.Add(myViewOne);
                // Build navigation list
                ddNavigation.Items.Add("View " + (i+1));
            }

            ddNavigation.Visible = true; // Unhide dropdown
            mvUserMultiview.ActiveViewIndex = 0; // Set multiview focus to first view
        }
        catch
        {

        }
    }
开发者ID:benstopics,项目名称:aspdotnet-semesterwebsite,代码行数:28,代码来源:Assignment03.aspx.cs


示例18: onClick

		public override void onClick(View view)
		{
			switch (view.Id)
			{
				case R.id.translate_button:
				{
					cancelAsyncTransaction();
					// translate all points coordinates using an async transaction
//JAVA TO C# CONVERTER TODO TASK: The following anonymous inner class could not be converted:
//					asyncTransaction = realm.executeTransaction(new io.realm.Realm.Transaction()
	//				{
	//					@@Override public void execute(Realm realm)
	//					{
	//						// query for all points
	//						RealmResults<Dot> dots = [email protected](Dot.class).findAll();
	//
	//						for (int i = dots.size() - 1; i >= 0; i--)
	//						{
	//							Dot dot = dots.get(i);
	//							if (dot.isValid())
	//							{
	//								int x = dot.getX();
	//								int y = dot.getY();
	//								dot.setX(y);
	//								dot.setY(x);
	//							}
	//						}
	//					}
	//				}
				   , new CallbackAnonymousInnerClassHelper(this)
				   );
					break;
				}
			}
		}
开发者ID:moljac,项目名称:Samples.Data.Porting,代码行数:35,代码来源:AsyncQueryFragment.cs


示例19: MemberRegistry

        //Constructor
        public MemberRegistry(View.Console a_view)
        {
            m_isInStartup = true;
            m_view = a_view;

            //try to load member list from storage
            m_memberListDAL = new Model.MemberListDAL();
            m_memberList = m_memberListDAL.LoadMemberList();
            if (m_memberList == null)
            {
                m_memberList = new Model.MemberList();
            }

            //subscribe to the MemberList
            m_memberList.AddSubscriber(this);

            //try to load user list from storage
            m_userListDAL = new Model.UserListDAL();
            m_userList = m_userListDAL.LoadUserList();
            if (m_userList == null)
            {
                m_userList = new Model.UserList();
            }

            //subscribe to the UserList
            m_userList.AddSubscriber(this);

            m_addingEditingMember = null;
            m_loggedInUser = null;
            m_memberFiltering = null;

            m_isInStartup = false;
        }
开发者ID:of222au,项目名称:1DV607-Objektorienterad-analys-och-design-med-UML,代码行数:34,代码来源:MemberRegistry.cs


示例20: GetView

 protected View GetView(string vn)
 {
     View v = new View();
     switch (vn)
     {
         case "Reports":
             return report_snapshot;
         case "My Services":
             return services_snapshot;
         case "Employees":
             return employee_snapshot;
         case "Business Overview":
             return business_snapshot;
         case "Customers":
             return customer_snapshot;
         case "Recent Activity":
             return recent_snapshot;
         case "Accounting Activity":
             return accounting_snapshot;
         case "PSI Support Tickets":
             return psi_support_tickets;
         case "PSI Overview":
             return psi_overview;
         case "PSI Support Follow Up":
             return psi_support_followup;
         case "Overview":
             return overview;
         case "Sales Overview":
             return sales_overview;
         case "Customer Dashboard":
             return customer;
         default:
             return services_snapshot;
     }
 }
开发者ID:dhuyvaert,项目名称:Sam_Solution,代码行数:35,代码来源:DashboardViews.ascx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ViewBase类代码示例发布时间:2022-05-24
下一篇:
C# VideoType类代码示例发布时间: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