コード例 #1
0
        void LayoutDoc_Closed(object sender, EventArgs e)
        {
            LayoutDocument layoutDoc  = sender as LayoutDocument;
            IViewHolder    viewHolder = layoutDoc.Content as IViewHolder;
            IView          view       = viewHolder.view;

            RemoveView(view);
        }
コード例 #2
0
        public override void setCoord(MapPoint mapPt)
        {
            string coord = string.Format("X = {0}, Z = {1}",
                                         Math.Round(mapPt.X, 2), Math.Round(mapPt.Y, 2));
            IViewHolder viewHolder = _parent as IViewHolder;

            if (viewHolder != null)
            {
                viewHolder.setCoord(coord);
            }
        }
コード例 #3
0
 private void CreateViewHolder()
 {
     try
     {
         m_viewHolder = new ViewHolder <IDebuggerSprinterView>("Debugger");
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
コード例 #4
0
ファイル: FddController.cs プロジェクト: zxmak/ZXMAK2
 private void CreateViewHolder()
 {
     try
     {
         m_viewHolder = new ViewHolder <IFddDebugView>(
             "WD1793",
             new Argument("debugTarget", m_wd));
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
コード例 #5
0
 private void CreateViewHolder()
 {
     try
     {
         m_viewHolder = new ViewHolder <IMemoryMapView>(
             "Memory Map",
             new Argument("memory", this));
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
コード例 #6
0
ファイル: TapeDevice.cs プロジェクト: alfishe/ZXMAK2
 private void CreateViewHolder()
 {
     try
     {
         m_viewHolder = new ViewHolder <ITapeView>(
             "Tape",
             new Argument("tapeDevice", this));
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
コード例 #7
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            IViewHolder viewHolder;
            View        view = convertView;

            if (view == null)
            {
                if (isGrid)
                {
                    view = layoutInflater.Inflate(Resource.Layout.simple_grid_item, parent, false);
                }
                else
                {
                    view = layoutInflater.Inflate(Resource.Layout.simple_list_item, parent, false);
                }


                viewHolder = new IViewHolder()
                {
                    textView  = view.FindViewById <TextView>(Resource.Id.text_view),
                    imageView = view.FindViewById <ImageView>(Resource.Id.image_view)
                };
                view.Tag = viewHolder;
            }
            else
            {
                viewHolder = (IViewHolder)view.Tag;
            }

            Context context = parent.Context;

            switch (position)
            {
            case 0:
                viewHolder.textView.Text = context.GetString(Resource.String.google_plus_title);
                viewHolder.imageView.SetImageResource(Resource.Drawable.ic_google_plus_icon);
                break;

            case 1:
                viewHolder.textView.Text = context.GetString(Resource.String.google_maps_title);
                viewHolder.imageView.SetImageResource(Resource.Drawable.ic_google_maps_icon);
                break;

            default:
                viewHolder.textView.Text = context.GetString(Resource.String.google_messenger_title);
                viewHolder.imageView.SetImageResource(Resource.Drawable.ic_google_messenger_icon);
                break;
            }
            return(view);
        }
コード例 #8
0
ファイル: IS3View2D.cs プロジェクト: flyong/iS3-Transplant
        public virtual void setCoord(MapPoint mapPt)
        {
            string format = "X = {0}, Y = {1}";

            if (eMap.MapType == EngineeringMapType.GeneralProfileMap)
            {
                format = "X = {0}, Z = {1}";
            }

            string coord = string.Format(format,
                                         Math.Round(mapPt.X, 2), Math.Round(mapPt.Y, 2));
            IViewHolder viewHolder = _parent as IViewHolder;

            if (viewHolder != null)
            {
                viewHolder.setCoord(coord);
            }
        }
コード例 #9
0
 public DropEvent(InventoryComponent carrier, InventorySlotResource slot, IViewHolder viewHolder)
 {
     this.carrier    = carrier;
     this.slot       = slot;
     this.viewHolder = viewHolder;
 }
コード例 #10
0
 public PickUpEvent(InventoryComponent carrier, CarriableComponent carried, IViewHolder viewHolder)
 {
     this.carrier    = carrier;
     this.carried    = carried;
     this.viewHolder = viewHolder;
 }