~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployWindow.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// WebDeployWindow.cs
 
2
// 
 
3
// Author:
 
4
//   Michael Hutchinson <mhutchinson@novell.com>
 
5
// 
 
6
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
 
7
// 
 
8
// Permission is hereby granted, free of charge, to any person obtaining
 
9
// a copy of this software and associated documentation files (the
 
10
// "Software"), to deal in the Software without restriction, including
 
11
// without limitation the rights to use, copy, modify, merge, publish,
 
12
// distribute, sublicense, and/or sell copies of the Software, and to
 
13
// permit persons to whom the Software is furnished to do so, subject to
 
14
// the following conditions:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be
 
17
// included in all copies or substantial portions of the Software.
 
18
// 
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
20
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
21
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
22
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 
23
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 
24
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 
25
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
26
 
 
27
using System;
 
28
using System.Collections.Generic;
 
29
using System.Threading;
 
30
using Gtk;
 
31
 
 
32
using MonoDevelop.Ide.Gui;
 
33
using MonoDevelop.Deployment;
 
34
using MonoDevelop.Core;
 
35
using MonoDevelop.Core.ProgressMonitoring;
 
36
using AspNetAddIn;
 
37
 
 
38
namespace MonoDevelop.AspNet.Deployment
 
39
{
 
40
        
 
41
        public partial class WebDeployWindow : Gtk.Dialog//, IProgressMonitor, IAsyncOperation
 
42
        {
 
43
                IList<WebDeployTarget> targets;
 
44
                AspNetAppProject project;
 
45
                DeployFileCollection deployFiles; 
 
46
 
 
47
                public WebDeployWindow (AspNetAppProject project, IList<WebDeployTarget> targets)
 
48
                {
 
49
                        this.Build();
 
50
                        this.targets = targets;
 
51
                        this.project = project;
 
52
                        deployFiles = project.GetDeployFiles ();
 
53
                }
 
54
                /*
 
55
                protected override void OnRealized ()
 
56
                {
 
57
                        base.OnRealized ();
 
58
                }
 
59
                
 
60
                void LaunchDeployThread ()
 
61
                {
 
62
                        Thread deployThread = new Thread (DeployThread);
 
63
                        deployThread.Start ();
 
64
                }
 
65
                
 
66
                void DeployThread ()
 
67
                {
 
68
                        IFileReplacePolicy replacePolicy = new MonoDevelop.Deployment.Gui.DialogFileReplacePolicy ();
 
69
                        
 
70
                        foreach (WebDeployTarget target in targets) {
 
71
                                FileCopyHandler handler = target.FileCopier.Handler;
 
72
                                //handler.CopyFiles (this, replacePolicy, target.FileCopier, deployFiles);
 
73
                        }
 
74
                
 
75
#region IProgressMonitor
 
76
                
 
77
                ProgressTracker progressTracker = new ProgressTracker ();
 
78
 
 
79
                public void IProgressMonitor.ReportError (string message, System.Exception exception)
 
80
                {
 
81
                }
 
82
 
 
83
                public void IProgressMonitor.ReportSuccess (string message)
 
84
                {
 
85
                }
 
86
 
 
87
                public void IProgressMonitor.ReportWarning (string message)
 
88
                {
 
89
                }
 
90
 
 
91
                public void IProgressMonitor.Step (int work)
 
92
                {
 
93
                        progressTracker.Step (work);
 
94
                }
 
95
 
 
96
                public void IProgressMonitor.EndTask ()
 
97
                {
 
98
                        progressTracker.EndTask ();
 
99
                }
 
100
 
 
101
                public void IProgressMonitor.BeginStepTask (string name, int totalWork, int stepSize)
 
102
                {
 
103
                        progressTracker.BeginStepTask (name, totalWork, stepSize);
 
104
                }
 
105
 
 
106
                public void IProgressMonitor.BeginTask (string name, int totalWork)
 
107
                {
 
108
                        progressTracker.BeginTask (name, totalWork);
 
109
                }
 
110
                
 
111
                public System.IO.TextWriter IProgressMonitor.Log {
 
112
                        get { return null; }
 
113
                }
 
114
                
 
115
                MonitorHandler IProgressMonitor_cancelRequested;
 
116
                event MonitorHandler IProgressMonitor.CancelRequested {
 
117
                        add {
 
118
                                lock(privateLock)
 
119
                                        IProgressMonitor_cancelRequested += value;
 
120
                        }
 
121
                        remove {
 
122
                                lock (privateLock)
 
123
                                        IProgressMonitor_cancelRequested -= value;
 
124
                        }
 
125
                }
 
126
                
 
127
                bool IProgressMonitor_cancelRequested = false;
 
128
                bool IProgressMonitor.IsCancelRequested {
 
129
                        //FIXME
 
130
                        get { return false; }
 
131
                }
 
132
                
 
133
                IAsyncOperation IProgressMonitor.AsyncOperation {
 
134
                        get { return (IAsyncOperation) this; }
 
135
                }
 
136
                
 
137
                object privateLock = new object ();
 
138
                object IProgressMonitor.SyncRoot {
 
139
                        get { return privateLock; }
 
140
                }
 
141
                
 
142
#endregion
 
143
 
 
144
#region IAsyncOperation
 
145
                void IAsyncOperation.WaitForCompleted ()
 
146
                {
 
147
                }
 
148
 
 
149
                void IAsyncOperation.Cancel ()
 
150
                {
 
151
                }
 
152
                
 
153
                event MonoDevelop.Core.OperationHandler IAsyncOperation.Completed;
 
154
 
 
155
                bool IAsyncOperation.IsCompleted {
 
156
                        get {
 
157
                        }
 
158
                }
 
159
 
 
160
                bool IAsyncOperation.Success {
 
161
                        get {
 
162
                        }
 
163
                }
 
164
                
 
165
#endregion*/
 
166
        }
 
167
}